remove tdont_be_stupid, fixes #10386
This commit is contained in:
parent
0d480bfe22
commit
f1a841c605
1 changed files with 0 additions and 23 deletions
|
|
@ -1,23 +0,0 @@
|
||||||
discard """
|
|
||||||
output: '''
|
|
||||||
100
|
|
||||||
200
|
|
||||||
300
|
|
||||||
400
|
|
||||||
'''
|
|
||||||
"""
|
|
||||||
|
|
||||||
import threadpool, os
|
|
||||||
|
|
||||||
proc single(time: int) =
|
|
||||||
sleep time
|
|
||||||
echo time
|
|
||||||
|
|
||||||
proc sleepsort(nums: openArray[int]) =
|
|
||||||
parallel:
|
|
||||||
var i = 0
|
|
||||||
while i <= len(nums) + -1:
|
|
||||||
spawn single(nums[i])
|
|
||||||
i += 1
|
|
||||||
|
|
||||||
sleepsort([400,100,300,200])
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue