api: threads, events
This commit is contained in:
12
autojs/src/main/assets/modules/__threads__.js
Normal file
12
autojs/src/main/assets/modules/__threads__.js
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
module.exports = function(__runtime__, scope){
|
||||
var threads = Object.create(__runtime__.threads);
|
||||
|
||||
|
||||
scope.sync = function(func, lock){
|
||||
lock = lock || null;
|
||||
return new org.mozilla.javascript.Synchronizer(func, lock);
|
||||
}
|
||||
|
||||
return threads;
|
||||
}
|
||||
Reference in New Issue
Block a user