state-threads
[Top] [All Lists]

Re: Porting from POSIX threads to State Threads

To: Mike Abbott <mja@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Porting from POSIX threads to State Threads
From: Claude Johnson <cjohnson@xxxxxxxxxx>
Date: Wed, 1 Aug 2001 11:07:00 -0700 (PDT)
Cc: state-threads@xxxxxxxxxxx
In-reply-to: <200108011800.LAA74496@xxxxxxxxxxxxxxxxxxx>
Sender: owner-state-threads@xxxxxxxxxxx
On Wed, 1 Aug 2001, Mike Abbott wrote:

[*]Unless your pthreaded application is fairly simple I would imagine that
[*]converting it to state threads would probably require redesigning it
[*]from scratch.  But since state threads are so much simpler to use than
[*]pthreads the mechanics of the switch should be pretty easy.  You won't
[*]need mutexes any more.  You won't have to bother with pthread_attr_t's
[*]and other barfage.  You will need to ensure that every blocking I/O call
[*]uses its st_ wrapper.

Hmm, I was just looking at how to deal with a pthread_detach call.
And since I'm not a programmer, this could take a while 8-)
There are lots of wrapper methods for the pthread functions 
(did I mention this app is in C++). So....

[Lossy compression]

[*]All that being said, state threads are not appropriate for every
[*]application.  Remember this mantra too:  State threads are best for
[*]network data driven apps.  Pthreads may work better for other kinds of
[*]jobs.

Yeah, this is a network server which is why ST looked compelling 
anyway. Thanx tho!

[*]-- 
[*]Michael J. Abbott        mja@xxxxxxx        www.repbot.org/mike
[*]

Claude Johnson
Network Scientist
Avamar Technologies
949.743.5145 Vox
949.743.5190 Fax
www.avamar.com


<Prev in Thread] Current Thread [Next in Thread>