On Sun, 26 Aug 2001, Piers Harding wrote:

> (1) Wrappering the libraries as a whole is possible - I have done a
> quick hack, but creating a callback into the perl interpreter from a
> threaded C++ library is proving very difficult indeed ( well at least
> it is for me ).

Can you describe your difficulties?  What approach have you taken?

One way you could go would be to treat the Perl interpreter as a
non-thread-safe resource and put locks around every access to it.  As long
as you can be sure that two threads can't access the interpreter at the
same time, you should be fine.

Alternately, you could build a treading Perl and attempt to create a Perl
thread for each C++ thread.

Since threads are considered experimental I would probably choose the
first option, but I imagine there are reasons you might try the latter.

-sam


Reply via email to