Branch: refs/heads/rurban/threads_array_heap
  Home:   https://github.com/parrot/parrot
  Commit: 031691aa416e284d278687289c47808f87063369
      
https://github.com/parrot/parrot/commit/031691aa416e284d278687289c47808f87063369
  Author: Reini Urban <[email protected]>
  Date:   2025-12-18 (Thu, 18 Dec 2025)

  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/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.


  Commit: 7f196dbff1788f2dd7bd9d1ac6fe4f9fb235c5df
      
https://github.com/parrot/parrot/commit/7f196dbff1788f2dd7bd9d1ac6fe4f9fb235c5df
  Author: Reini Urban <[email protected]>
  Date:   2025-12-18 (Thu, 18 Dec 2025)

  Changed paths:
    M compilers/imcc/pbc.c
    M include/parrot/thread.h
    M src/interp/api.c
    M src/thread.c

  Log Message:
  -----------
  Seperate thread_kill from thread_destroy

Rename Parrot_thread_destroy to Parrot_thread_destroy_all
Add an earlier Parrot_thread_kill_all step, which kills the
foreign tasks, and use the later Parrot_thread_destroy_all to
cancel the threads, kill its interpreters and free the threads_array.

I'm not sure if the scenario is sound and right but the tests pass.


  Commit: 916a6ad4a909e11781583bafaaa13a921113febb
      
https://github.com/parrot/parrot/commit/916a6ad4a909e11781583bafaaa13a921113febb
  Author: Reini Urban <[email protected]>
  Date:   2025-12-18 (Thu, 18 Dec 2025)

  Changed paths:
    M include/parrot/thread.h
    M src/interp/api.c
    M src/thread.c

  Log Message:
  -----------
  Do Parrot_thread_kill_all before Parrot_runcore_destroy

Change Parrot_thread_destroy_all(interp) to Parrot_thread_destroy_all(NULL)
No interp needed for the interp's in the global threads_array.


Compare: https://github.com/parrot/parrot/compare/42bb40569547...916a6ad4a909

To unsubscribe from these emails, change your notification settings at 
https://github.com/parrot/parrot/settings/notifications
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-commits

Reply via email to