33 Commits

Author SHA1 Message Date
Dylan K. Taylor
be0e85dfae CommandReader: fix notifier race condition crash, don't start self in constructor
self-start is extremely annoying!
2018-05-09 20:01:16 +01:00
Dylan K. Taylor
2a0a2134d1
Server: Implemented an signal/sleep interrupt mechanism for ticking (#2171)
This allows other threads to notify the main thread to wake it up while it's sleeping between ticks, allowing reduction of processing latency.

Currently only RakLib and the CommandReader threads utilize this, but it's planned to extend it to more things in the near future.

CommandReader is now event-driven instead of poll-based - the server will not poll the CommandReader thread for messages each tick anymore.

RakLib utilizes this mechanism to get packets processed without delays to lower latency.

This now adds an extra dependency - `pocketmine/snooze` library contains the meat of the code used for this. See the Snooze repository for details.
2018-05-09 14:18:13 +01:00
Dylan K. Taylor
d80f711d18 CommandReader: Removed redundant else branch 2017-12-07 13:50:24 +00:00
Dylan K. Taylor
ebd3d207e4 Fixed server not accepting commands after pressing ctrl+D (non-readline) 2017-12-07 13:42:34 +00:00
Dylan K. Taylor
31f0437c96 fix readline crash when user presses ctrl+D 2017-12-07 13:41:58 +00:00
Dylan K. Taylor
74b074753f Bulk addition of constant visibilities
thanks PhpStorm inspections plugin for annoying the shit out of me until
I did this.
2017-11-21 14:44:10 +00:00
Dylan K. Taylor
dbb92096e4 More typehints, documentation fixes and static analysis cleanup 2017-07-15 12:12:06 +01:00
Dylan K. Taylor
2a7b736f18 Heap of bugfixes, cleanup and PHP 7 upgrades 2017-07-13 19:18:56 +01:00
Dylan K. Taylor
a365c831a8 Fixed some doc problems 2017-06-25 12:07:28 +01:00
Dylan K. Taylor
75863e2a44 OCD commit 2017-06-07 12:54:12 +01:00
Dylan K. Taylor
8f9c52507a Some PhpStorm cleanup 2017-02-12 12:36:02 +00:00
Dylan K. Taylor
4ace4b9542 Fixed CommandReader hanging on shutdown, close #25 (#171)
Use stream_select to poll stdin status before reading
Add detection for FIFO pipes, rewrite half of the CommandReader (again)
Add timeout for CommandReader to prevent hang in Windows custom consoles (unknown reason)
2017-01-07 10:28:03 +00:00
Tim (robske_110)
d84f990574 Fix Windows console unresponsive after a few hours, close #104 (#106) 2016-12-17 10:31:10 +00:00
Dylan K. Taylor
ebcc16d283 Fix --disable-readline command-line option does not work, close #34 (#35)
* Fix --disable-readline command-line option does not work, close #34

* add parentheses
2016-10-18 14:33:38 +01:00
Shoghi Cervantes
472fcfa4c7 Removed ThreadedFactory 2015-09-18 11:18:41 +02:00
Shoghi Cervantes
e137ac4c56 Base PHP7 work to make it "run" - READ NEXT LINES!
All plugins will need to bump the API if they want to use this.
NOTE THAT THIS IS NOT THE FINAL API 2.0.0 AND THAT THERE WILL BE MORE CHANGES.
To start updating, you might also want to read https://secure.php.net/manual/en/migration70.php and specifically https://secure.php.net/manual/en/migration70.incompatible.php

To compile PHP7 with some of the required dependencies, use https://gist.github.com/shoghicp/166ab26ce5cc7a390f45
ONLY LINUX IS TESTED, DO NOT ASK FOR OTHER PLATFORMS!

----- THIS VERSION IS NOT SUPPORTED -----

This version WILL crash randomly in unexpected places due to PHP7, pthreads, PocketMine or cosmic rays.

Handle with care, and store under direct sunlight for the best performance.
2015-09-10 21:29:29 +02:00
Shoghi Cervantes
b47cebb1d5 PHP7 changes 2015-08-23 00:25:30 +02:00
Shoghi Cervantes
7cf5df7e46 New console output formatting 2015-06-09 14:40:40 +02:00
Shoghi Cervantes
03f178379e
Fixed items getting corrupted pickup delay, not being able to be killed by other damage sources 2015-05-28 22:17:12 +02:00
Shoghi Cervantes
b2c25eaf36
Added MemoryManager, new memory properties, improved performance, updated RakLib, fixed misc. bugs 2015-04-18 20:13:52 +02:00
Shoghi Cervantes
807107e581
Fixed constructors, default memory to -1, default async generator 2015-03-14 15:51:21 +01:00
Shoghi Cervantes
9158cc4f19
Implemented Threaded ClassLoader, improves class loading while on different threads (no need to synchronize states) 2015-03-14 15:22:42 +01:00
Shoghi Cervantes
04bdb13103
Improved move offset check 2015-01-02 19:14:18 +01:00
Shoghi Cervantes
692045d714
Improved threading and resource usage, new defaults 2015-01-02 18:46:39 +01:00
Shoghi Cervantes
aa992684ba
Possible workaround for some PHP bug 2014-12-24 00:55:23 +01:00
Shoghi Cervantes
8b6681c56d FIxed some preprocessor includes 2014-12-07 22:05:45 +01:00
Shoghi Cervantes
9e3d432b9e Faster Level provider chunk unloading 2014-12-07 21:51:57 +01:00
Shoghi Cervantes
747f7685e7 Fix formatting issues due to bad IDE settings 2014-12-07 16:30:04 +01:00
Shoghi Cervantes
161e7ae7ec Fix CPU issue when starting without STDIN 2014-12-07 02:42:38 +01:00
Shoghi Cervantes
602bdf27a5 Compatibility with pthreads > 2.0.8 2014-10-02 16:58:37 +02:00
Shoghi Cervantes
344c84cfa6 Added --disable-readline CLI argument 2014-09-07 19:42:36 +02:00
Shoghi Cervantes
51120fdd4f Added ThreadManager, removed PHP self-kill 2014-08-08 11:36:55 +02:00
Shoghi Cervantes
dd17652aca Fixed wrong paths 2014-04-01 05:06:12 +02:00