forked from LeenkxTeam/LNXSDK
Update
This commit is contained in:
@ -105,9 +105,7 @@ class Process {
|
||||
}
|
||||
|
||||
public function exitCode(block:Bool = true):Null<Int> {
|
||||
if (block == false)
|
||||
throw "Non blocking exitCode() not supported on this platform";
|
||||
return NativeProcess.process_exit(p);
|
||||
return NativeProcess.process_exit(p, block);
|
||||
}
|
||||
|
||||
public function close():Void {
|
||||
|
||||
33
Kha/Tools/windows_x64/std/cpp/_std/sys/thread/Condition.hx
Normal file
33
Kha/Tools/windows_x64/std/cpp/_std/sys/thread/Condition.hx
Normal file
@ -0,0 +1,33 @@
|
||||
package sys.thread;
|
||||
|
||||
@:coreApi
|
||||
class Condition {
|
||||
var c:Dynamic;
|
||||
public function new():Void {
|
||||
c = untyped __global__.__hxcpp_condition_create();
|
||||
}
|
||||
|
||||
public function acquire():Void {
|
||||
untyped __global__.__hxcpp_condition_acquire(c);
|
||||
}
|
||||
|
||||
public function tryAcquire():Bool {
|
||||
return untyped __global__.__hxcpp_condition_try_acquire(c);
|
||||
}
|
||||
|
||||
public function release():Void {
|
||||
untyped __global__.__hxcpp_condition_release(c);
|
||||
}
|
||||
|
||||
public function wait():Void {
|
||||
untyped __global__.__hxcpp_condition_wait(c);
|
||||
}
|
||||
|
||||
public function signal():Void {
|
||||
untyped __global__.__hxcpp_condition_signal(c);
|
||||
}
|
||||
|
||||
public function broadcast():Void {
|
||||
untyped __global__.__hxcpp_condition_broadcast(c);
|
||||
}
|
||||
}
|
||||
22
Kha/Tools/windows_x64/std/cpp/_std/sys/thread/Semaphore.hx
Normal file
22
Kha/Tools/windows_x64/std/cpp/_std/sys/thread/Semaphore.hx
Normal file
@ -0,0 +1,22 @@
|
||||
package sys.thread;
|
||||
|
||||
@:coreApi
|
||||
class Semaphore {
|
||||
var m:Dynamic;
|
||||
|
||||
public function new(value:Int) {
|
||||
m = untyped __global__.__hxcpp_semaphore_create(value);
|
||||
}
|
||||
|
||||
public function acquire():Void {
|
||||
untyped __global__.__hxcpp_semaphore_acquire(m);
|
||||
}
|
||||
|
||||
public function tryAcquire(?timeout:Float):Bool {
|
||||
return untyped __global__.__hxcpp_semaphore_try_acquire(m, timeout == null ? 0 : (timeout:Float));
|
||||
}
|
||||
|
||||
public function release():Void {
|
||||
untyped __global__.__hxcpp_semaphore_release(m);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user