Re: [Evolution-hackers] EPlugin, export mail folder, Update!




Since i got the copying of mbox files in a separate thread, and After
that its done, i want to run the compression on the exported data. I
need to know when the exporting is done.

Eh how would i know that?  

Well in evolution-mail we use the primitives in 'mail-mt.h', or the async message passing primitives in 'libedataserver/e-msgport.h' to communicate between threads.

Plus the stuff in camel/camel-operation.h to communicate progress/handle user cancellation.

Using the mail-mt stuff is good since it does some of the setup work for you, and lets you setup 4 callbacks, one to say what you're doing, one to do the work in the other thread, one to do any work back in the gui thread, and one to clean up.  You also have a little control over scheduling - i.e. should it run in a new thread or just use one of the thread queues, so you don't get too much thrashing.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]