On Sun, 2009-07-12 at 17:46 +0100, Mark Ellis wrote:

[snip]

> > MS buils these interfaces on top of the Component Object Model (COM) so
> > C++ would be a natural fit, but if you implement it in C for easier Ruby
> > bindings that's fine. Just add "this" (or "self" :-) as first parameter.
> > (I would have implemented the original librapi2 in C++ 
> 
> I'm glad you didn't, I probably wouldn't have bothered fiddling with
> it :)

Great, because I'm very happy that you fiddle with SynCE!

> > if it wasn't
> > because I hoped that language bindings would be easier with a C
> > interface.)
> > 

[snap]

> > Locking (per session)  should really be done inside the RAPI calls,
> not
> > outside.
> > 
> 
> Yes, I think each context needs internal locking, but I'm not sure how
> this should be done. Can we just use pthread mutexes ?

Yes pthread mutexes is the way to go. Essentially all socket access in a
function should be within a single "critical section" protected by a
mutex.

If you want some autofoo exercising you could figure out how to build
two versions of librapi2, where librapi2_r.so require pthreads and use
mutexes to be thread-safe.


Best regards,

David Eriksson, http://www.divideandconquer.se/


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
SynCE-Devel mailing list
SynCE-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synce-devel

Reply via email to