Re: Threading

On 8/6/06, A. Pagaltzis <pagaltzis gmx de> wrote:
* Jens Luedicke <jens luedicke gmail com> [2006-08-06 21:40]:
> any hints?

The simplest (in some way) is if you can peform your long task
piecemeal. Then just do it bit by bit in an idle callback.

It is for file operations within my file manager project.

It is no problem to show the dialog from within the thread, but
destroying it leads to a crash.

Another option might be to fork off a child process to perform
the heavy-duty work and have the parent listen to the child on a
pipe. You can have Glib take care of the asynchronicity for you
by sticking the processing code in an I/O watcher callback.

I think that would be the best option. Would require some work
to get this implemented.


Jens Luedicke

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