Eu 3 multi processor?
- Posted by akusaya at gmx.net Oct 18, 2006
- 492 views
This is the first time I tried multi threading in Eu. I made a program like this: procedure task() for i = 1 to 100000000000 do task_yield() if remainder(i, 100000) = 0 then printf(1, "taskid %d is now %d\n", {task_self(), i}) end if end for end procedure object t1, t2 t1 = task_create(routine_id("task"), {}) t2 = task_create(routine_id("task"), {}) task_schedule(t1, 1) task_schedule(t2, 1) while 1 do task_yield() end while The problem is I have dual core CPU but Eu only use one of them! So CPU usage is only 50%. Knowing the current CPU trend where the improvements are not in terms of speed but having multiple cores, how can I have Eu utilize all the CPU? Or did I made a wrong program above?