| View previous topic :: View next topic |
| Author |
Message |
Vincent Diepeveen
Joined: 09 Mar 2006 Posts: 1738 Location: The Netherlands
|
Post subject: Re: A question about thread-architecture. Posted: Sun Apr 15, 2012 12:29 am |
|
|
| Sven Schüle wrote: |
| mar wrote: |
| diep wrote: |
b) here is most important problem: that is that the i/o thread you don't want it to eat a full core. So basically you need to call Sleep there.
I have it sleep 10 milliseconds for example each time. Now that seems fine, except when you want to play super superbullet type games with your engine.
|
Hi Vincent,
I wonder why you sleep in the I/O thread? I have a plain while ( fgets() ) loop and haven't noticed the I/O thread eat any CPU time. Perhaps you read the input in a different way?
I thought that fgets on stdin should always be blocking...
Martin |
Actually I wondered about exactly the same thing. A blocking read does not eat CPU time. Sleep() is not appropriate here IMO.
Sven |
You cannot do blocking read of course in the thread that commands the search. A 3d thread is used for that in Diep in its own DEP protocol. |
|
| Back to top |
|
 |
|
| Subject |
Author |
Date/Time |
A question about thread-architecture. |
Fermin Serrano |
Thu Apr 12, 2012 3:47 pm |
Re: A question about thread-architecture. |
Thomas Petzke |
Thu Apr 12, 2012 3:58 pm |
Re: A question about thread-architecture. |
Mark Pearce |
Fri Apr 13, 2012 12:38 am |
Re: A question about thread-architecture. |
Martin Sedlak |
Thu Apr 12, 2012 4:08 pm |
Re: A question about thread-architecture. |
Robert Hyatt |
Thu Apr 12, 2012 7:19 pm |
Re: A question about thread-architecture. |
Robert Hyatt |
Thu Apr 12, 2012 7:17 pm |
Re: A question about thread-architecture. |
Richard Allbert |
Fri Apr 13, 2012 5:52 am |
Re: A question about thread-architecture. |
Vincent Diepeveen |
Fri Apr 13, 2012 11:42 am |
Re: A question about thread-architecture. |
Martin Sedlak |
Fri Apr 13, 2012 12:04 pm |
Re: A question about thread-architecture. |
Sven Schüle |
Fri Apr 13, 2012 3:24 pm |
Re: A question about thread-architecture. |
Robert Hyatt |
Sat Apr 14, 2012 4:21 am |
Re: A question about thread-architecture. |
Marco Costalba |
Sat Apr 14, 2012 6:49 am |
Re: A question about thread-architecture. |
Vincent Diepeveen |
Sun Apr 15, 2012 1:13 am |
Re: A question about thread-architecture. |
Marco Costalba |
Sun Apr 15, 2012 9:56 am |
Re: A question about thread-architecture. |
Robert Hyatt |
Mon Apr 16, 2012 7:26 pm |
Re: A question about thread-architecture. |
Vincent Diepeveen |
Sun Apr 15, 2012 12:29 am |
Re: A question about thread-architecture. |
Sven Schüle |
Tue Apr 17, 2012 3:34 pm |
Re: A question about thread-architecture. |
Robert Hyatt |
Tue Apr 17, 2012 4:21 pm |
Re: A question about thread-architecture. |
Vincent Diepeveen |
Wed Apr 18, 2012 12:06 am |
Re: A question about thread-architecture. |
Sven Schüle |
Wed Apr 18, 2012 9:27 am |
Re: A question about thread-architecture. |
Vincent Diepeveen |
Sun Apr 15, 2012 12:27 am |
Re: A question about thread-architecture. |
Robert Hyatt |
Sat Apr 14, 2012 4:18 am |
Re: A question about thread-architecture. |
Vincent Diepeveen |
Sun Apr 15, 2012 12:32 am |
Re: A question about thread-architecture. |
Robert Hyatt |
Tue Apr 17, 2012 3:01 pm |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|