-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asynchronous Inbox + asynchronous house saving #4561
Open
gunzino
wants to merge
29
commits into
otland:master
Choose a base branch
from
gunzino:async-inbox
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
e96e679
Complete zero-blocking Inbox implementation using separate thread and…
gunzino e799c78
don't include inbox in market when it's yet been loaded
gunzino a73866b
fix compiling error
gunzino b9b5841
fix some of the clang formatting
gunzino b5f725f
fix more clang formations
gunzino 9eb9667
fix PlayerDBEntry initialization
gunzino 39db25f
naming bugfix for win32 implementation
gunzino 59a8fce
naming bugfix for win32 implementation
gunzino 5b17a28
send to offline player's inbox using IOInbox::pushDeliveryItems
gunzino ae24883
clear loading set before making flush
gunzino aa16531
simplify internalAddThing
gunzino 9b7ca7d
corrected receiver GUID in mailbox
gunzino 62a7dc5
applied modifications from ramon-bernardo
gunzino df3c967
house.cpp format fix
gunzino ffefcfb
properly unlock mutex
gunzino 58e50cb
use const uint32_t& guid for all IOInbox functions
gunzino 991ebff
corrected misleading info about thread
gunzino 99dc929
use static for IOInbox::createInboxItem
gunzino 25ce4b5
use const in saveInbox
gunzino 8d9b2b6
deliver items to inbox in situation when player logs out during loadi…
gunzino 1bd9b53
rename g_dispatcherInbox to g_asyncTasks, preparation for async house…
gunzino 9de7e6a
asynchronous, zero-blocking house saving
gunzino f9ebe3a
fix clang formatting
gunzino b23c27f
return correct value when saving individual house
gunzino 3a7b4be
moved private variables to .cpp namespace
gunzino 8fcdcde
fixed clang formatting
gunzino 40c17e6
Merge branch 'otland:master' into async-inbox
gunzino 93bc130
fixed conflict
gunzino 34ddc13
Merge branch 'master' into async-inbox
gunzino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC
getInstance
already returns an "async" instance, used for other purposes but should be suitable. Why having another instance?On that note, singleton sucks, but a "doubleton" is even worse 😆 let's just make it not a global and pass it around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean byt getInstance returns "async" instance? Is Database class thread-safe? Can database class execute multiple parallel queries from several threads? The asyncInstance is there only to be used by g_asyncTasks thread for async database IO- in this PR it is now only House and Inbox.