Skip to content
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

Thread updates #6

Merged
merged 12 commits into from
Jun 16, 2020
Merged

Thread updates #6

merged 12 commits into from
Jun 16, 2020

Conversation

ShelbyZ
Copy link
Contributor

@ShelbyZ ShelbyZ commented Jun 7, 2020

This is a collection of updates to move away from Win32 thread calls and provide more handling around errors found in other threads not causing Xiloader to exit.

  • CreateThread -> std::thread
  • Collapsed some thread spawning (FFXI Server -> FFXIDataComm, PolServer -> spawn PolDataComm)
  • Exit FFXI thread last
  • Update generic sleep calls - we may be able to turn these sleep calls into yield
  • Provide signaling via shared state (mutex, condition_variable)
  • Move FFXI into separate launch thread from main(...)
  • main(...) waits for threads triggering a shutdown
  • Socket cleanup logic
  • Move global variables to local/passed to functions

Tested against local topaz servers and a few remote (Canaria, etc).

Below is a sample exit:

image

Accept Failed is triggered when xiloader closes up communication sockets during shutdown. If we do not close the sockets xiloader will hang on looking for connections or receiving data.

@zircon-tpl zircon-tpl merged commit c592b58 into zircon-tpl:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants