Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dofile("core")
- local sock = socket_create(AF_INET, SOCK_DGRAM, 0)
- socket_bind(sock, 1234)
- local function target_worker()
- for i=1,20 do
- print('target_worker (' .. tostring(pid()) .. ')')
- local buffer = socket_recv(sock)
- sleep(5)
- end
- end
- local function target_scheduler()
- for i=1,10 do
- print('target_scheduler')
- process_create(target_worker)
- sleep(1)
- end
- end
- process_create(target_scheduler)
- sched()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement