mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 09:13:08 +03:00
Schedule fetches so the frontend can wait for a scheduled event, rather than busy-looping.
This commit is contained in:
parent
0d976df9f3
commit
c6c4747a28
@ -239,6 +239,10 @@ nserror netsurf_init(int *pargc,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void netsurf_fetch_callback(void *p)
|
||||
{
|
||||
hlcache_poll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gui NetSurf main loop.
|
||||
@ -246,8 +250,9 @@ nserror netsurf_init(int *pargc,
|
||||
int netsurf_main_loop(void)
|
||||
{
|
||||
while (!netsurf_quit) {
|
||||
if(fetch_active)
|
||||
schedule(0, netsurf_fetch_callback, NULL);
|
||||
gui_poll(fetch_active);
|
||||
hlcache_poll();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user