[parrot/parrot] 240885: Dynamic threads_array in the heap, i.e. massive pa...

GitHub noreply at github.com
Tue Sep 18 00:34:42 UTC 2012


  Branch: refs/heads/rurban/threads_array_heap
  Home:   https://github.com/parrot/parrot
  Commit: 240885ee9917dd768c7898d71e355140220ec9ee
      https://github.com/parrot/parrot/commit/240885ee9917dd768c7898d71e355140220ec9ee
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2012-09-17 (Mon, 17 Sep 2012)

  Changed paths:
    M include/parrot/thr_none.h
    M include/parrot/thr_pthread.h
    M include/parrot/thr_windows.h
    M include/parrot/thread.h
    M src/interp/api.c
    M src/pmc/task.pmc
    M src/thread.c

  Log Message:
  -----------
  Dynamic threads_array in the heap, i.e. massive parallel multi-threading

For what it's worth, this branch implements up to 16.000 threads (just an
arbitrary limit) by allocating threads_array on the heap.
I do not want to realloc this array on demand when a new task is created,
I rather want it to be at the same location.

What I'm not sure is if the tasks and threads need to be killed at interp
teardown at all, or just be freed. Cancelling or terminating a thread is
not really friendly. The current code passes all tests.





More information about the parrot-commits mailing list