freenode/#clasp - IRC Chatlog
Search
2:06:25
drmeister
I'm still waiting for cclasp to finish building - but slime in bclasp+mps works fine with multithreading.
2:21:14
drmeister
They guess they must establish a restart context and then unwind to that and return?
2:24:15
Bike
you signal an error. if it's handled by something no problem, it's just control flow. otherwise it starts the debugger, which opens an sldb window or whatever, and maybe that restarts, but it's still fundamentally thread local.
2:25:18
drmeister
Understood. I really liked working with core files on linux today. I'm going to start generating them on OS X.
2:25:47
drmeister
Yes - It's so much more convenient than starting everything up again in the debugger and trying to reproduce the error.
2:27:55
drmeister
Hmm, no problems with quitting from sldb with cclasp - I cleaned out the .slime/fasls - maybe that was the problem.
3:38:49
drmeister
(loop repeat 8 do (mp:process-run-function 'foo #'(lambda () (fibn 100000000 78))))
4:29:17
drmeister
Do you know about the Memory Pool System library? It's got a lot of the features that you have been talking about. Non moving pools, mark and sweep pools, compacting pools etc.
4:35:15
Bike
like you can specify "allocation pattern" hints, and schedule collections in a soft real time way
4:38:39
drmeister
Bike: Did you see these functions? https://github.com/drmeister/clasp/blob/dev/src/gctools/gcFunctions.cc#L471
4:41:07
Bike
i think room is slightly dangerous. the documentation says you can't map objects (with mps_amc_apply) without parking the arena first.
4:45:39
drmeister
Yeah - I went looking for the call that parked the arena in cl__room and didn't see it - why did I leave that out?
4:51:52
beach
drmeister: As a general principle, I am not interested in trying to keep up with external software. I see every day how Clasp maintainers try to debug problems with unknown code, try to contact people in charge, try to figure what will break after the next release of such code, etc.
4:51:58
beach
I am even less interested if this software happens to be written in C or some other low-level language. When it comes to memory management, I would like to try out my own ideas first, because they are made possible by the uniform representation of SICL objects.
4:51:59
beach
It may not be worthwhile trying to keep up with a complex system such as MPS when I only need a tiny fraction of what it can do. I am willing to change my mind, of course, but only after I try my own ideas.
4:55:31
drmeister
I know - I'm just making small talk - and I'm happy for the help that stassats gave me.
12:24:53
drmeister
I haven't done coordination between threads before - I need to do a bit of research.
12:35:46
Shinmera
drmeister: To synchronise two threads you use a barrier, or failing such a construct a monitor/condition variable, or failing such a construct, a spinlock with an exponential backoff.
12:38:25
stassats
anyway, spinlock is an optimization which may result in poor performance and energy usage if done incorrectly
13:25:28
drmeister
I don't have formal training in parallel programming. I'm picking this up as I go along.
13:29:18
stassats
it works, until it doesn't, when your checker becomes unscheduled and the child thread progresses to Exit, it'll spin forever
13:31:17
drmeister
Right - so my while (this->_Phase != Active) {}; was not completely wrong headed. I'm reacting and not thinking - its too early.
13:32:11
drmeister
I'm going to take a shower and then take another look at it and look at condition variables. I implemented them but haven't used them yet.
13:33:52
drmeister
pthreads have them - I have been careful not to mix C++ threading constructs and pthreads. I can't be sure what the underlying implementation of the C++ threading constructs are.
13:34:02
drmeister
I have this: https://github.com/drmeister/clasp/blob/dev/include/clasp/core/mpPackage.fwd.h#L270
13:34:14
drmeister
And exposed it to Common Lisp here: https://github.com/drmeister/clasp/blob/dev/include/clasp/core/mpPackage.h#L285