I am trying to create a simple GTK application. I would like to write things on the GUI as soon as certain files are created by different processes. I guess I cannot do a class UserController < AdminController
...
user = abc(params)
...
end
in the parent process, because that would freeze the GUI. Instead, I am trying to fork, check if files are present and manipulate the GUI, but it does not seem to work, my clumsy code is the following:
while(true)
答案 0 :(得分:3)
如果要执行I / O操作,请查看集成到GLib的gio。因此,您应该使用GFileMonitor
使用inotify来通知文件系统更改。 &#34;描述&#34; GFileMonitor
部分介绍了要使用的功能。