Closed sebasguts closed 6 years ago
Probably a bit late, but you can fix it by calling MakeImmutable( IO );
from the main thread.
Apparently the IO_*
functions try to access constants(?) defined in the record IO, which is owned by thread 0.
The documentation states that:
In the C library a lot of integers are defined as macros in header files. All the necessary values for the above functions are bound to their name in the global IO record.
Is there an easy way to check, whether IO_*
functions only ever read components of that record, but never write to it?
IO has other problems with HPC-GAP in that it uses(ed?) global variables in the C code and leaks(ed?) even file descriptors.
Should be fixed really.
Ooh, that sounds unpleasant.
I'm trying to use it in an extra thread (i.e. not thread 0) to communicate with another non-GAP process. The first, very simple tests are running fine atm.
What is that other non-gap process?
Basically a compiler I'd say. It's simulating things and we're just planning to send small messages, representing tuples, from the compiler to GAP and vice versa.
You could use ZeroMQ for that which is thread safe and everything.
Ah cool, thx for the hint. I'll have a look into the HPCGAP doc. (I've looked into IO since I wanted to get named pipes to work under GAP)
Resolved by PR #65 resp. 2511739678a81762bab7abfe214ca8fd7a50c5a1
IO does not work in any other thread than thread 0. To see this, type