The current mutex based system works, but it has one significant taglib level shortcoming that FileTypeResolver takes only filenames and not IOStream.
In addition, the requirement that no v8 activity occurs in a worker thread requires hacks like the mutex one currently in place. This is obviously not fun, and at some point I want to allow resolvers themselves to notify the format via a callback. Finally reading and writing from buffers using BufferStream means that JS resolvers should be able to get a buffer as an argument.
So we need our own system, that will trigger the callbacks sequentially whenever a read is attempted, then use the format string to create the right File wrapping the BufferStream.
The current mutex based system works, but it has one significant taglib level shortcoming that FileTypeResolver takes only filenames and not IOStream.
In addition, the requirement that no v8 activity occurs in a worker thread requires hacks like the mutex one currently in place. This is obviously not fun, and at some point I want to allow resolvers themselves to notify the format via a callback. Finally reading and writing from buffers using BufferStream means that JS resolvers should be able to get a buffer as an argument.
So we need our own system, that will trigger the callbacks sequentially whenever a read is attempted, then use the format string to create the right File wrapping the BufferStream.