On Mon, Jul 30, 2001 at 10:39:31AM -0500, Archie Cobbs wrote: > This is not related to the current thread, but maybe this is a good > time to mention my pth "wish list". > > I'd be interested also in other people's comments, I'm sure many > of these ideas are arguable.. > > PTH WISH LIST > ------------- > > - The pth_msgport stuff is not object oriented (you must include the > structure in your own structure) and from the man page it is not clear > how to actually create one. Look at test_mp.c which well illustrate the usage. The message to be passed must have pth_message_t as the first entry: struct my_message { pth_message_t haad; /* this must be here */ char* whatever; int whatdoyouwhat; } > > - Precisely document all return value possibilities: e.g., some functions > return TRUE/FALSE while others may return -1 and errno. Not always clear. What I figured out is that most returns 1 on success. (I expected 0 on success so that I could do if( pth_whatever() ) { perror("FATAL"); } or something like that.) If int is the return type, some useful infomation can be passed. For example, int pth_msgport_put( .. ) returns 1 on success, but how about returning the number of pending message on that port? <cut> My wish list is - Allow suspend the current thread using pth_suspend (or add a new function just for it). < I guess there's (a) good reason(s) Ralf did not allow it, but .... it's my wish > - Pth scheduler check waiting queue, then ready queue, but if the number of waiting thread is big, the performance suffers. If check ready queue first, then check waiting queue iff there's no thread in the ready queue, then go back to ready queue again iff there was one or more thread moved from waiting to ready queue. The queue is FIFO, so checking out waiting queue does not improve the fairness anyways. Is there any better reason not to do this? Thank you very much. (to be honest, I wish I could hack the pth_lib src myself instead of putting my wish here). ______________________________________________________________________ GNU Portable Threads (Pth) http://www.gnu.org/software/pth/ User Support Mailing List [EMAIL PROTECTED] Automated List Manager (Majordomo) [EMAIL PROTECTED]