From: brian g. <bg...@po...> - 2002-07-23 04:27:13
|
hi all, in an effort to avoid my doctoral studies, i've compressed the Player server (just client handling, not device drivers) into a single thread, as summarized by my cvs log message below. if you find bugs, let me know. if something serious comes up, you can roll back to the tag 'pre-single-thread'. brian. ------------------------------------------------------------------------------- the Player server is now entirely in one thread, which works more or less like so: for(;;) { usleep(0); // yields 100Hz loop Accept(); // accept any new connections Read(); // read data from clients (by poll()ing with timeout of 0) Write(); // if it's time, write data to clients } i have *NOT* tested this thoroughly yet (e.g., with lots of clients, under heavy load, or with many concurrent (dis)connections) but it seems to work fine. besides, i have thrown away so many mutexes in the last two hours that i might just cry with joy. ------------------------------------------------------------------------------- |
From: Richard V. <va...@hr...> - 2002-07-23 16:22:07
|
you go, girl! On Mon, 22 Jul 2002, brian gerkey wrote: > hi all, > in an effort to avoid my doctoral studies, i've compressed the Player > server (just client handling, not device drivers) into a single thread, as > summarized by my cvs log message below. > > if you find bugs, let me know. if something serious comes up, you > can roll back to the tag 'pre-single-thread'. > > brian. > > ------------------------------------------------------------------------------- > the Player server is now entirely in one thread, which works more or less > like so: > > for(;;) > { > usleep(0); // yields 100Hz loop > Accept(); // accept any new connections > Read(); // read data from clients (by poll()ing with timeout of 0) > Write(); // if it's time, write data to clients > } > > i have *NOT* tested this thoroughly yet (e.g., with lots of clients, under > heavy load, or with many concurrent (dis)connections) but it seems to > work fine. > > besides, i have thrown away so many mutexes in the last two hours that i > might just cry with joy. > ------------------------------------------------------------------------------- > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Playerstage-developers mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-developers > -- Richard Vaughan HRL Laboratories [va...@hr...] |