Hi,

I have several C threads running, each with an embedded perl interpreter. One of the threads does the work (lots of number crunching hence the C base - but also uses perl/XS), while another thread provides a user interface.

The communication between the threads is a classic FIFO messaging system which pass pointers to C structs created by the worker thread. These structs have associated typemap entries that allow the user interface thread (using perl) to display them. The working thread also has a few SV's used to hold logging and other textual content.

The question is what is the best way to get this text in the worker SV's over to the user interface thread? At the moment I'm using a brute force approach (creating a new char pointer and coping the SV contents) but it's not exactly efficient:)

I'm using a threaded version of perl 5.6.

Cheers,

jez.






Reply via email to