This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
[core] Abstract libuv - #3139
Merged
Merged
Conversation
Contributor
Author
11 tasks done
tmpsantos
force-pushed
the
tmpsantos-libuv_abstracted
branch
3 times, most recently
from
November 30, 2015 14:09
5bb52db to
c95c4ba
Compare
Contributor
There was a problem hiding this comment.
What's this necessary for? IIRC, we want to use the apps partly as as examples, which means they should avoid using internal includes.
Contributor
Author
There was a problem hiding this comment.
This one slipped. Removing.
tmpsantos
force-pushed
the
tmpsantos-libuv_abstracted
branch
from
November 30, 2015 22:31
c95c4ba to
6083882
Compare
It was being used as a normal mutex anyway.
Moved the fd watcher to the RunLoop. So far only needs to be implemented by platforms using HTTPCurlRequest et al.
ASSET=zip make test-* was broken and now works. Also added a test stressing concurrent file access.
Now only a few things depend on libuv and they can use it directly.
Also simplified the code making the logic more linear.
tmpsantos
force-pushed
the
tmpsantos-libuv_abstracted
branch
from
December 1, 2015 09:49
6083882 to
e7b6d72
Compare
This was referenced Jan 5, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch reduces the delta between master and the Qt branch that is under development. It enables the platform to reimplement the main loop and get rid of libuv in favor of, say, glib or the Qt main loop.
Wrapping is mostly done by reusing existing
util::likeutil::Threadand also by 3 new classes:AsyncTask: Send asynchronous messages to the main loop where theAsyncTaskobject lives, coalescing multiple messages.Timer: an ordinary timer.RunLoop: not exactly new but was refactored to allow reimplementation. Consists of a platform main loop, usingAsyncTaskinternally for waking up.All these new classes were implemented in a way to be almost a drop-in replacement for the libuv counterparts, making the changes as mild as possible.
AssetFSandAssetZIPare exceptions, as they were heavily refactored to useutil::Threadfor doing threaded file I/O instead of libuv workers.For all the newly introduced classes, unit tests were also added and in some cases, like for the
AssetZIP, broken unit tests were fixed and more were added.This PR also is also a enabler for #2909.