diff options
author | 2016-03-12 12:31:13 +0100 | |
---|---|---|
committer | 2016-03-12 12:31:13 +0100 | |
commit | a026a582f1a0ea8c1ede3acaddacef506ef3f3b0 (patch) | |
tree | e31573822f2359677de519f9f3b600d98e8764cd /3rdparty/luv/examples/uvbook/queue-work.lua | |
parent | 477d2abd43984f076b7e45f5527591fa8fd0d241 (diff) | |
parent | dcab55bf53b94713a6f72e9633f5101c8dd6c08c (diff) |
Merge pull request #15 from mamedev/master
Sync to base master
Diffstat (limited to '3rdparty/luv/examples/uvbook/queue-work.lua')
-rw-r--r-- | 3rdparty/luv/examples/uvbook/queue-work.lua | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/3rdparty/luv/examples/uvbook/queue-work.lua b/3rdparty/luv/examples/uvbook/queue-work.lua deleted file mode 100644 index cf52abfb216..00000000000 --- a/3rdparty/luv/examples/uvbook/queue-work.lua +++ /dev/null @@ -1,19 +0,0 @@ -local uv = require('luv') - -local ctx = uv.new_work( - function(n) --work,in threadpool - local uv = require('luv') - local t = uv.thread_self() - uv.sleep(100) - return n*n,n - end, - function(r,n) print(string.format('%d => %d',n,r)) end --after work, in loop thread -) -uv.queue_work(ctx,2) -uv.queue_work(ctx,4) -uv.queue_work(ctx,6) -uv.queue_work(ctx,8) -uv.queue_work(ctx,10) - -uv.run('default') -uv.loop_close() |