mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Run all task spawning through util, to allow for easy hooking.
During debugging, I found it useful to hook all task creation in a central location, and util::task was the perfect place for it. r? @pcwalton (or maybe someone else, I'm kinda sending you a bunch of reviews today because I don't know who better to give them to)
This commit is contained in:
parent
9e94ecf99c
commit
6df1cc8e4c
14 changed files with 48 additions and 36 deletions
|
@ -13,6 +13,7 @@ use sync::Arc;
|
|||
use font_template::{FontTemplate, FontTemplateDescriptor};
|
||||
use platform::font_template::FontTemplateData;
|
||||
use servo_net::resource_task::{ResourceTask, load_whole_resource};
|
||||
use servo_util::task::spawn_named;
|
||||
use style::{Source, LocalSource, UrlSource_};
|
||||
|
||||
/// A list of font templates that make up a given font family.
|
||||
|
@ -245,7 +246,7 @@ impl FontCacheTask {
|
|||
pub fn new(resource_task: ResourceTask) -> FontCacheTask {
|
||||
let (chan, port) = channel();
|
||||
|
||||
spawn(proc() {
|
||||
spawn_named("font-cache-task", proc() {
|
||||
// TODO: Allow users to specify these.
|
||||
let mut generic_fonts = HashMap::with_capacity(5);
|
||||
add_generic_font(&mut generic_fonts, "serif", "Times New Roman");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue