PSA: Dispatching background tasks just got easier!

2019-12-16 Thread Kristen Wright
Hello!
Now that Bug 1584568  just landed I wanted to
mention the new background thread pool for general purpose and blocking IO
runnables. Existing one-off threads, as well as new jobs that you may want
to run async in the background, can go to the new background thread pool
with NS_DispatchBackgroundTask(...)
.
If you've got something that cares about what order it runs in you would
want to use NS_CreateBackgroundTaskQueue

instead.

In the past, we've sent a lot of general I/O jobs to the stream transport
service. For a lot of cases, it's now possible to use the dedicated
background threads instead. To access the I/O threads when dispatching to
the pool or to a background task queue, use the NS_DISPATCH_EVENT_MAY_BLOCK

flag, to ensure that blocking I/O goes to its dedicated thread pool.

For a lot of cases, converting your existing async jobs or adding new ones
is pretty straightforward. Some examples of using background dispatch can
be found in Bug 1594858  for a basic background
task, Bug 1595242  for some background I/O, and Bug
1594814  for one that needs to use a background
task queue. Our tracking bug for this work is Bug 1595241
.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


PSA: Hang Reports in tests now have the correct crash signature

2020-02-06 Thread Kristen Wright
[Cross-posting to stability]
In tests, the crash report now correctly reflects the hanging or crashing
process. With Bug 1605328
 fixed, the crashing
process .dmp file will be sorted at the top of the list and therefore
output the hanging crashing process stack trace first. This will lead to a
difference in what order they show up in Treeherder, because your process
stack traces will output in a different order. The benefit of this is that
bugs filed from the report now reflect the hanging or crashing process
instead of using the main process. This means that new bugs on existing
crashes may now be filed with the correct signatures.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform