In recent Unity 6.0 Web player builds, with “Enable Native C/C++ Multithreading” player setting checked, Unity.Jobs.LowLevel.Unsafe.JobsUtility.JobWorkerCount returns 5, and the profiler shows parallel job execution on those workers.
This is cool, but… is it usable for anything - would be great if it was. Specifically, since the problems with multithreading in Web sound like they’re primarily about the GC, if we have code that doesn’t access managed classes (i.e. jobs that compile with Burst on other platforms), is it currently possible to run those jobs on worker threads in a Web build?
This would make iterating on performance for web waaay nicer. Right now we’re writing C++ for multithreaded optimization on Web, if we could just use C# instead it makes testing in editor much easier. And saves us messing around with CMake. I’m still not sure whether CMake was industrial sabotage, an elaborate joke, or written by the Rust community as a prank on C++, but it’s done well.
What you’re seeing is most likely a requirement for or side effect of enabling C++ multithreading.
The official word is still that C# multithreading is unsupported and will remain that way for the time being due to lack of browser support (and you’re correct it has to do with the GC and progress is being made).
Even if you were able to get some Jobs to run in parallel, you would simply have no idea about its limitations, current issues, future changes and what not. Writing your code against an API that isn’t even marked as experimental would be a serious strategic risk. It’s just not worth even thinking about it at this point. Wait for an official announcement. 
Please stop replying when you have no useful technical contribution. We can all read roadmaps.
You didn’t mention you are following the roadmap.
So no, you cannot use Jobs on the Web as of Unity 6.0. I haven’t seen or heard of anyone succeeding to even create a Jobs-enabled web build no matter what. That’s technically accurate to the best of my knowledge.
Hi,
Unfortunately, I can’t recommend you right now to use the Job System together with the “Enable Native C/C++ Multithreading” player setting for any production code.
As you already mentioned we currently don’t support C# multithreading. Aside from the .NET threading primitives this also includes the Unity Job System.
We are investigating our options for supporting C# multithreading and the Job System is part of that research.
Just following up here that Unity now has a guide for multithreading/concurrency on the web, which includes multithreading support for the Burst compiler:
Thanks for hightlighting that
Yes, we added official support in Unity 6.4 for using the “Enable Native C/C++ Multithreading” with Burst-compiled jobs.
This mean the Job System can be fully utilized now and the jobs will be automatically scheduled on the main thread or worker thread depending on if they are Burst-compiled or not.
Another follow up:
I created a small library for co-operative scheduling on Unity web and desktop. It uses async functionality to easily run long running tasks on the web across multiple frames with minimal change to code. On the desktop platform, it forwards requests to run on the background thread to the Awaitable class, giving true multithreading.
On the web platform, you simply assign an execution budget per frame, and tasks will be executed until the budget is exhausted. Once the budget is exhausted, tasks will be deferred to the next frame. Tasks are expected to co-operatively yield to ensure that the scheduler has the opportunity to do its thing.
The library is available as a single C# file here, released into the public domain:
calebh/unity-cooperative: A cooperative async scheduler for Unity web and desktop