v76a Unsafe call!!!!!
Monkey Forums/Monkey Programming/v76a Unsafe call!!!!!
| ||
Just messing around with creating a very simple lock/unlock mutex mechanism. On unsupported devices I want to fake the mutex system so I just added a Mutex class that handles this. For native code I will eventually use native locking calls to handle the locks. This works fine on android, but if I compile for glfw I get: ATTENTION: Compilation error reported by Trans: Unsafe call!!!!! |
| ||
brl.thread is really meant for internal use only - in particular, gc is single threaded so calling Monkey functions on a thread can be decidedly deadly if gc ends up being invoked. To that end, there's some fudge in there that means method/function names with __UNSAFE__ in them can only other __UNSAFE__ methods/functions - or, native methods/functions. |
| ||
Ah ok cheers for the clarification. Any plans on improving the threading support to make it more robust? Some basic block control and signalling would be helpful. |
| ||
I suppose I could finish off Diddy's threading side-project... There's a couple of unimplemented targets, but other than that it's essentially a simplified posix-thread implementation. https://code.google.com/p/diddy/source/browse/#hg%2Fsrc%2Fthreading |