[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]thread's questions
From: |
Gopal V |
Subject: |
Re: [DotGNU]thread's questions |
Date: |
Wed, 14 May 2003 19:43:09 +0530 |
User-agent: |
Mutt/1.2.5i |
If memory serves me right, imateos wrote:
> Hi all,
Since Rhys has probably slept by now ... I'll try to stand-in and
explain :-)
> I'm trying to understand how the differents threads in the engine are
> created and sincronized:
Currently pnet supports only one thread IIRC ...
ILThreadAtomicStart();
....
ILThreadAtomicEnd();
is used for Mutex IIRC ..
The support/thread.c has all the Sync function you'll ever need .. if
you do get around to hacking on threading , those functions will help
you ...
Threading work in current pnet is about enabling threading and then
debugging the segfaults as they occur by adding locks ... I really wish
we could have Rhys write out the basic internal calls like
#ifdef ENABLE_THREADING
threading code ...
#endif
and those debugging it can uncomment ENABLE_THREADING and hack out issues.
Last time Nick (of Qt#) tried it and gave up after some time ...
Anyway a lot of locks are needed right now :-)
This is not newbie stuff but is a lot easier because support/thread.c has
a set of nice tests in ilunit/test_thread test-suite ... I think if anyone
with basic threading experience got down and dirty for a week or so , it
might be just what the doctor ordered !.
> Is always a garbage collector thread running?
I think Boehm does not use a threaded GC . As far as my experience lies ,
it starts collecting when an alloc fails ... But I might be wrong !
Anyway stack-traces of finalize calls seem to appear to be starting from
a point in code rather than from a seperate thread ... (which makes debugging
it a lot harder than usual)..
> When and where is the "ILThreadCreate" function called?
>
> As far as I've understood, one ILThread is created for each application?
1 ILExecProcess for each app
Many threads are grouped under ILExecProcess
ilrun.c: 346
thread = ILExecProcessGetMain(process);
The ILExecThread allows for thread local variables. ( though why I should
say that now ... I don't know ...)
Does that answer your question ?
Gopal
--
The difference between insanity and genius is measured by success