Re: Multithreaded applications
Paulo Moura <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 04/01/2014, at 12:53, German Vidal <[email protected]> wrote: > Thanks for the quick reply. > >>> anyone knows if there's a way to control the scheduling policy when >>> implementing multithreaded applications? >> >> Not as yet. I guess you refer to setting priorities? > > That could be useful, but I guess it's not what I'm looking for. > Actually I was considering whether there's a way to execute all possible > thread interleavings (to discover errors manifested only in certain > thread schedules, as it is usually done in model checking). > > So I wondered if there's a way to do that without implementing a > scheduler on top of the threads library (or, as you suggested, > extending src/pl-thread.c). The threads standardization proposal includes some suggestions for thread_create/3 optional scheduling options: http://prolog.logtalk.org/viewtopic.php?f=3&t=2 See page 4 of the PDF file. Cheers, Paulo ----------------------------------------------------------------- Paulo Moura Logtalk developer Email: <mailto:[email protected]> Web: <http://logtalk.org/> -----------------------------------------------------------------