Make sql requests asynchonous #14
Labels
No Label
Breaking
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: quentinlegot/Toolbox#14
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Each sql request currently block the main thread, a "slow" request (network are always slow compared toEach sql request currently block the main thread, a "slow" request (network are always slow compared to others IO, even on LAN) can really slower the TPS, and it could be a serious problem with many players.
Multiple solutions:
The last solution is my least prefered, still blocking the thread when awaiting for the result but with a separate thread or threadpool, we cannot exploit the result easily (need a message passing method).
But waiting for the result require to block the main thread.
The issue is to resync on main thread (create a new sync task) when the request is terminated and exploit it, so we don't block uselessly the main thread others IO, even on LAN) can really slower the TPS, and it could be a serious problem with many players.
The issue is to resync on main thread (create a new sync task) when the request is terminated and exploit it, so we don't block uselessly the main thread.