From: Stef B. <st...@gm...> - 2011-02-05 14:24:24
|
Hi, after some work I get the epoll working in combination with threads. I've implemented a semaphore for communication between mainloop and the worker thread. Not everything is like it should, but I'm very happy. Note when reading the data with fuse_chan_recv, there are no mutexes locked. This is not necessary, cause this is not happing more than once at the same time. It's part of the mainloop, and there is only one. There is also no lock around fuse_session_process. This is not necessary when the fs is thread safe. The semaphore is working very good. This setup is not fuse specific, it can also be used for other apps/servers which have some io, like a webserver, and workerthreads. Some things I think of is: . the message/buff as a separate struct, and not direct part of worker struct. Stef |