Re: What is the relationship between LW process priorities and operating
system thread priorities?
On Thu, 31 Aug 2006 14:10:14 +0200, Eivind Midtgård <eivind@autosim.no> wrote:
> LWW 4.4.6 or LWW 5.0
>
> I have an application with several Lisp threads, all at the same
> priority (the default, 0). The program loads a dll (c++), which
> starts several other threads; these operate independently of the
> main program, and run at THREAD_PRIORITY_NORMAL. They are passive
> most of the time.
>
> When the user takes a certain action, one of the dll threads becomes
> very active for a couple of minutes. This is normal. At the same
> time, all the Lisp threads seems to be nearly frozen. One of them
> prints debug messages to the console all the time. This print is
> usually fast, but while the C++-thread is active, the print comes a
> few lines at a time, with long intervals between (several seconds,
> varying between 2 and 40).
>
> So it seems to me that the Lisp threads perhaps have lower
> priorities than THREAD_PRIORITY_NORMAL. Can this be the case?
>
> What is the relationship between the LW thread priorities, and the
> Windows thread priorities? Is there anything I should/can do to
> ensure the Lisp threads are not preempted by the C++ threads?
I don't know the answers to your questions, but as a first measure you
could use the FFI and functions like GetPriorityClass and
GetThreadPriority to find out the priority of your Lisp threads.
It would certainly be interesting to hear from LispWorks how LW
priorities are related to OS priorities, especially as on Windows
there are priority /classes/ as well as priority /levels/.
Cheers,
Edi.