0
Create 5 workers concurrent print out numbers from 1 to 1000. Note: for the whole result each number only can display once only.
Example output format: {"Worker":{"WorkerID":1, "Number":1}} {"Worker":{"WorkerID":2, "Number":3}} {"Worker":{"WorkerID":3, "Number":2}} {"Worker":{"WorkerID":4, "Number":4}} {"Worker":{"WorkerID":5, "Number":5}} ..... {"Worker":{"WorkerID":5, "Number":1000}}
1 Antwort
+ 1
you can use threads or background worker.
for the numbers create a static field which all threads have access to that