I have the following code for a Job:
https://ghostbin.axel.org/paste/v8nwb
I am scheduling and Awaiting it in the following code:
var metadataBlobResults = new NativeList<BlobAssetReference<ContentPackMetadataBlob>>(allDirectories.Count, Allocator.TempJob);
var jobHandle = ContentLoadJobs.ScheduleMetadataBlobsFromPetitionDirectoryPathAsync(
ref allDirectories, ref allDirectoriesPetitions, ref metadataBlobResults,
out var inputDirectories, out var inputPetitions, out var errors);
while (!jobHandle.IsCompleted)
await Awaitable.NextFrameAsync();
This in turn is also in another Awaitable (thats why of the Awaitable.NextFrameAsync(), which gets called like so: ```cs
var loadTask = ContentLoadAsyncOrchestrator.LoadContentAsync(petitions, Manager);
while (!loadTask.GetAwaiter().IsCompleted)
World.Update();
I'm running and debugging the code through tests, and the issue is that it hangs permanently and I have to kill Unity's process. Debugging and putting a breakpoint in the jobHandle / await Awaitable.NextFrameAsync(); shows that it only gets hit once.
I've put breakpoints inside the job itself and the exception block never gets hit either, so it might not be a "exception gets swallowed" case as no exception gets thrown.
No breaks due to exception happen and no log messages appear in console.
Putting a breakpoint at the Test's class ``World.Update()`` shows that the World is properly getting updated, getting hit multiple times, so the code is still running.
I have absolutely no idea what is making the code hang, I previously had another step before this one where I `await` a Task for reading files async and that hanged as well, but as that task was meaningless I just removed it. This is to say that I believe there's something wrong with `await` and how I'm scheduling it. The Editor hangs as well so I cannot use the job profiler to see what's going on.
