[Spread-users] spread 4.0rc2, C and multithreading

Jonathan Stanton jonathan at cnds.jhu.edu
Tue Mar 4 16:02:43 EST 2008


I took a look at this patch and it makes sense to me. Missing the unlock on the error path is 
clearly a bug. I'll apply it. 

The libspread-core (not t) is not meant to be threadsafe as it does not protect against 
multiple readers and is not linked against threadsafe c libraries. It should generally only be 
used in single-threaded programs. However, if you are managing the locking for Spread 
connnections yourself and want to have direct control over what the library is doing (so it 
never blocks behind your back) then you could use the libspread-core library in a multithreaded 
program by making sure you never have two threads in conflicting library calls at the same 
time. 

Thanks,

Jonathan

On Mon, Mar 03, 2008 at 11:57:34AM +0100, jabe at gfz-potsdam.de wrote:
> On Tuesday 31 October 2006 09:26:14 Jan wrote:
> > > Jan,
> > >
> > > Thanks for the tip.  Your example looks like it should work.  I'll
> > > investigate and see if I can reproduce your behavior and debug it.
> >
> > I have investigated some more work into this and at the end it shows that
> > linking against the spread singlethreading library (I think its called
> > libspread-core) works. The multithreading version of spread shows the
> > behaviour as described in my previous post.
> 
> After some time I discovered some problems using libspread-core in a 
> multithreaded environment so I have to use libtspread-core. I patched the 
> spread source to fix the bug described in my first post. The patch is 
> attached and seems to resolve this issue.
> 
> I would appreciate a bugfix release to not include a fix-branch of spread in 
> my distribution itself.
> 
> BTW, does anyone know why no distribution includes spread 4 up to now? Are 
> there any reasons for that?
> 
> Regards,
> Jan


> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users


-- 
-------------------------------------------------------
Jonathan R. Stanton         jonathan at cs.jhu.edu
Dept. of Computer Science   
Johns Hopkins University    
-------------------------------------------------------




More information about the Spread-users mailing list