Re: [v8-users] Thread cleanup

2015-10-18 Thread Alex Kodat
Sorry, I was too hasty. Obviously, one doesn't need the Isolate lock to remove PerIsolateThreadData from the linked list, one needs the thread_data_table_mutex_ lock. FWIW, it strikes me as very odd that ThreadDataTable is process-wide with a static pointer. Given that its lone data member is

[v8-users] Thread cleanup

2015-10-18 Thread Alex Kodat
If I have an app that steadily creates and joins threads, is there a good way of cleaning up the thread-specific data when a thread terminates? Looking at the v8 code, it seems that ThreadManager::FreeThreadResources in v8threads.cc would be a place this might happen when called from the Locker

Re: [v8-users] Thread cleanup

2015-10-18 Thread Jakob Kummerow
On Sun, Oct 18, 2015 at 8:16 AM, Alex Kodat wrote: > If I have an app that steadily creates and joins threads, is there a good > way of cleaning up the thread-specific data when a thread terminates? > Looking at the v8 code, it seems that ThreadManager::FreeThreadResources

Re: [v8-users] performance oddities of v8 Arrays

2015-10-18 Thread Jakob Kummerow
On Sat, Oct 17, 2015 at 12:20 AM, Dmitry Orlov wrote: > Thanks Jacob! > > On 16 October 2015 at 13:56, Jakob Kummerow > wrote: > >> It's not about what the "internal array representation" is, it's about >> how the array is accessed. V8 employs all

[v8-users] Track script execution start and stop.

2015-10-18 Thread Bogdan Padalko
Hi, I'm embedding v8 and have to limit max time that arbitrary script execution may take. As to script running complete event, it is more or less clear - v8::Isolate::AddCallCompletedCallback() will do the job, but as to catching start I'm stuck a bit. There is v8::Isolate::SetEventLogger()

Re: [v8-users] Thread cleanup

2015-10-18 Thread Alex Kodat
Jakob, Thanks for that. I might just take a swing at an unintrusive patch. Along those lines it seems that thread resource cleanup would be closely tied to the Locker as one would need the isolate lock while freeing PerIsolateThreadData but would presumably want to release the lock