502a3c653cFix yield in catch block
Nathan Hourt
2014-10-17 13:43:08 -0400
7ddf882459Fix linux build
Vikram Rajkumar
2014-10-17 13:23:51 -0400
b026e82451Remove task priority hack that is no longer needed
Eric Frias
2014-10-17 12:04:21 -0400
227767a425Fix type of PRECISION
Eric Frias
2014-10-16 19:00:30 -0400
b34a222dc5Remove #ifdefed-out code
Eric Frias
2014-10-16 17:50:58 -0400
e5666cca54Convert ready_head (list of fibers able to run immediately) into a priority heap
Eric Frias
2014-10-16 16:26:19 -0400
95eb84e62dAdd missing include
Eric Frias
2014-10-16 16:25:12 -0400
1af4ac6a5cSchedule fibers in the order they are asynced or unblocked. Earlier behavior was always to start newly-asycned tasks before resuming existing tasks, so existing tasks could be starved if there was a steady stream of new tasks created. Now all tasks are started or resumed in the order they are created or unblocked.
Eric Frias
2014-10-14 14:21:42 -0400
a426bf9710whitespace and spelling fixes, no functional changes
Eric Frias
2014-10-13 11:44:16 -0400
5e7cd9776eA few more real128 tests
Nathan Hourt
2014-10-16 09:31:15 -0400
dfe67a4494adding blob type to variant
Daniel Larimer
2014-10-15 23:32:37 -0400
ec9e85d268fix fixed point math
Daniel Larimer
2014-10-15 20:46:24 -0400
2b76b6d5feAdd another uint128 test
Nathan Hourt
2014-10-15 18:00:31 -0400
c3a6b40188Test and bugfix real128
Nathan Hourt
2014-10-15 17:53:15 -0400
b55ae3431aadding real 128 for fixed point 64.64 math
Daniel Larimer
2014-10-15 17:00:49 -0400
b63e6a8b81Allow recursive fc::mutexes
Eric Frias
2014-10-12 17:28:41 -0400
4e83427df0Improvements for handling unicode filenames on Windows. When converting fc::path to/from fc::variant, use utf8 encoding. Replace several places where we use a std::ifstream and open it with a char* filename with a boost::filesystem::ifstream and open it with a boost::filesystem::path, which does unicode correctly.
Eric Frias
2014-10-09 16:21:52 -0400
06ca6d8981Fix bug that was causing NTP to fail to update after the first check
Eric Frias
2014-10-07 11:49:35 -0400
82dd74add0Retry NTP requests more frequently if we don't receive a (valid) reply
Eric Frias
2014-10-07 11:10:27 -0400
0d61966a1cImprove NTP math
Eric Frias
2014-10-07 10:31:19 -0400
5a615e6b21Execute async tasks in the order they were asynced (this only changes the behavior of tasks that hadn't started executing yet, it doesn't change anything about the order blocked tasks unblock)
Eric Frias
2014-10-03 16:52:45 -0400
256df78fc6Allow binaries compiled on a system that doesn't support SO_REUSEPORT to use the option on systems that do support it
Eric Frias
2014-10-02 14:49:38 -0400
5fa3cb8632Add < operation to private_key to allow usage as an ordered key
Vikram Rajkumar
2014-10-02 12:55:20 -0400
c4e814d7deAdded more logging to ntp and fixed code indentation.
dnotestein
2014-09-30 10:53:23 -0400
53196706f0Add some more logging to ntp time synchronization code.
dnotestein
2014-09-29 18:55:35 -0400
8def04f341Add a path::preferred_string() function that generates a string in the platform's preferred format, using backslashes on win32 (uses boost::filesystem::path::make_preferred()). Modify the log file configuration and rotating code to call to_native_ansi_path() and do more paths manipulation in fc::path objects and less in std::strings, in an attempt to improve BitShares/bitshares_toolkit#791
Eric Frias
2014-09-25 08:57:31 -0400
6cddd42cfeOn windows, change the method we use for getting the home directory and app data directory to get it in unicode form. Partial fix for BitShares/bitshares_toolkit#791
Eric Frias
2014-09-20 19:15:28 -0400
2f066e4adfFix a crash in fc::process when not capturing all three stdin/out/err Quiet a few 64-bit warnings.
Eric Frias
2014-09-18 11:17:26 -0400
439232f750Merge pull request #40 from dbrock/master
Nikolai Mushegian
2014-09-17 16:53:04 -0400
bd846576f6Compare HTTP headers case-insensitively
Daniel Brockman
2014-09-17 22:48:05 +0200
07e3947ed4Fix bug in json pretty printer which broke formatting and possibly corrupted json
Nathan Hourt
2014-09-17 13:27:37 -0400
7966587021Wrap a few boost asio exceptions in fc exceptions
Eric Frias
2014-09-16 09:33:51 -0400
7b8394a781Use set_reuse_addr in http_server
Daniel Brockman
2014-09-15 20:30:31 +0200
b0c68813cbMerge pull request #38 from InvictusInnovations/revert-37-master
Nikolai Mushegian
2014-09-15 14:06:43 -0400
60781c532bRevert "Set SO_REUSEADDR to avoid having to wait for network ports to be released when restarting the client"
Nikolai Mushegian
2014-09-15 14:06:37 -0400
59c6882b03Merge pull request #37 from dbrock/master
Nikolai Mushegian
2014-09-15 14:04:49 -0400
9ba96f9dcfSet SO_REUSEADDR
Daniel Brockman
2014-09-15 20:00:52 +0200
b5414af3ceRestore an accidentally-commented-out line that was preventing NTP from restarting after encountering an error.
Eric Frias
2014-09-14 19:53:08 -0400
3ee5f756fbFix a yield-during-catch bug in udp_socket, and add a shared_ptr version of udp_socket::send_to() which will avoid reading from uninitialized memory in the face of cancellation.
Eric Frias
2014-09-12 19:42:25 -0400
1daaab43acAdd assert to catch any time we yield during a catch{} block
Eric Frias
2014-09-12 14:28:56 -0400
751777e754Fix more locations where we were making boost::asio calls with buffers declared on the stack which could cause problems when the calling tasks were canceled.
Eric Frias
2014-09-11 16:30:03 -0400
55e7a073cfFix build error in salsa20.cpp
Nathan
2014-09-09 16:09:49 -0400
aa6882b3b7Allow us to safely cancel tasks that are executing asynchronous network reads and writes. This was previously unsafe because we almost always passed read/write buffers to boost that were on the stack. Canceling the task deleted the stack and therefore the buffer, but couldn't reliably prevent boost from writing to the buffer if data came in after the cancel. This commit adds variants of the read and write functions that take a shared_ptr<char> instead of a raw char* as the buffer, and these variants will ensure the shared_ptr will outlive the boost::asio read/write.
Eric Frias
2014-09-09 11:10:37 -0400
db8eb2e5d4Revert "Instead of canceling the read_loop, close the socket and wait for the read_loop to finish as a result. This prevents the receive_from from writing into the buffer (which is on the stack!) after the task is canceled. This caused nasty intermittent exception stack unwind errors."
Eric Frias
2014-09-09 11:08:27 -0400
c79cbdae8eInstead of canceling the read_loop, close the socket and wait for the read_loop to finish as a result. This prevents the receive_from from writing into the buffer (which is on the stack!) after the task is canceled. This caused nasty intermittent exception stack unwind errors.
dnotestein
2014-09-08 17:23:03 -0400
881903c1beWrap boost::exception with fc::exception in fc::ip::endpoint::from_string() Restructure udp_socket::receive_from() to something functionally identical, but has one less exception handler on the stack which I hope would make it easier to debug strange exception-handling errors encountered on win64
Eric Frias
2014-09-08 16:10:42 -0400
10fdbcf5b3Dequeue a thread from a blocking promise's notify list when the all the thread's tasks that are waiting on that promise are canceled. This prevents a crash when the promise is fulfilled after the thread is destroyed. Re-organize read-loop execution to avoid crashes in read_loop on Win32 when ntp object destructs. Call quit on ntp_thread when ntp object destructs to free up thread (eventually we need to make fc::threads call quit in their destructor, but more work is required to make that work properly). ~fc::udp_socket now closes socket on destruction (consider doing this for tcp sockets as well).
dnotestein
2014-09-08 15:31:13 -0400
130da3623eAllow fibers to be canceled while they're sleeping or blocked on promises
Eric Frias
2014-09-08 10:31:07 -0400
454573e048Add support for boost 1.56.
Eric Frias
2014-09-07 18:02:39 -0400
9b6facea3fMake the JSON parser less fragile
Nathan Hourt
2014-09-08 10:12:42 -0400
b6e38cd5ecEliminate unnecessary cast in endpoint::from_string
dnotestein
2014-09-08 10:10:19 -0400
21db937ba7Add reflector for multimap
Nathan Hourt
2014-09-04 19:14:23 -0400
a0b3a9a92dRestore function-like semicolon-swallowing behavior to FC_THROW
Eric Frias
2014-09-02 15:21:30 -0400
3222dc7c0bWhen reusing a context, re-initialize most of its fields. This fixes at least two errors: - we were canceling tasks that hadn't been canceled, because the canceled flag was left set to true and the next task assigned to the context then became canceled as soon as it yielded - we were resumeing blocked tasks before they should have resumed, because their blocking_promises list wasn't cleared and they were unblocking because the erroneous promises were fulfilled As a debugging aid, we also record the cancellation reason whenever a task is canceled, and include that in the canceled_exception (this is only enabled in debug builds)
Eric Frias
2014-08-28 15:42:01 -0400
f8472af119Change fc::canceled_exceptions thrown due to a socket operation being canceled into regular fc::exceptions -- we're reserving canceled_exception for canceling async tasks
Eric Frias
2014-08-28 15:34:04 -0400
477d3397f6Merge branch 'log_task_names'
Eric Frias
2014-08-28 15:29:14 -0400
da15557c85assert() instead of throwing fc::null_optional exception when dereferencing an invalid optional. Before, the behavior was to throw null_optional in debug mode and to allow the dereference in release, which masked the error
Eric Frias
2014-08-28 11:42:46 -0400
ac385d1f6bAllow the user to supply a reason string when canceling a task (useful for debugging)
Eric Frias
2014-08-27 14:07:44 -0400
8841f5e271Import thread/task_specific variables
Eric Frias
2014-08-27 12:20:19 -0400
d9e6a9e568When a task is canceled while blocking on a mutex, fix the code that removes it from the mutex's block list to null out its "next" pointer, which is assumed to be null whenever not blocked on a mutex
Eric Frias
2014-08-27 11:55:14 -0400
976bbce668When locking a mutex, ensure the task has a context before attempting to lock.
Eric Frias
2014-08-25 18:44:15 -0400
d188b138d6Allow fc::canceled_exception to pass through places where we were catching and ignoring all fc::exceptions
Eric Frias
2014-08-25 18:43:12 -0400
27096f15a7Log the names of tasks to the log file (now contains thread_name:task_name}
Eric Frias
2014-08-24 18:33:05 -0400
198d858d59Wrap boost exceptions in fc exceptions for a few socket operations that can throw
Eric Frias
2014-08-24 14:47:01 -0400
578527626cSupport GNTP password authentication
Eric Frias
2014-08-21 19:32:56 -0400
156a7cc4b4Allow setting hostname
Eric Frias
2014-08-21 16:14:08 -0400
ed2f543c24Add a test that verifies that canceling a task that has a mutex locked cleans up properly (it does)
Eric Frias
2014-08-21 15:22:43 -0400
362884fc52Import GNTP notification code
Eric Frias
2014-08-15 17:02:02 -0400
9e75d47ba3Fix to an issue causing a thread to exit if any fiber therein self-cancels
Nathan Hourt
2014-08-21 14:36:29 -0400
8468f392cedefault to_string conversion is now fixed
Daniel Larimer
2014-08-13 16:06:42 -0400
92d29ac657Prevent crash at shutdown rescheduling NTP task
Eric Frias
2014-08-12 15:19:44 -0400
978de7885aAdd a macro to check if a task that shouldn't yield actually yields.
Eric Frias
2014-08-02 19:43:28 -0400
8fa21821aeSuppress "inherited via dominance" warning
Eric Frias
2014-08-02 15:48:19 -0400
7cc69f3bb7Set canceled flag in task's context object so that we cancel out of active tasks when they try to resume. Wrap a try-catch block around tcp and udp resolve requests to convert any non-fc exceptions to fc exceptions. Minor change to clarify design intent that request_time_task should always be running in _ntp_thread.
dnotestein
2014-08-01 11:31:36 -0400
eae493a8c1Remove unnecessary code from init_openssl after update new OpenSSL package.
PaulEU
2014-07-29 23:44:47 +0200
3ccbe26dd5adding aes exception
Daniel Larimer
2014-07-29 13:54:50 -0400
d847f6469aAllow us to require assigning descriptions to all async tasks to aid in debugging
Eric Frias
2014-07-27 17:37:21 -0400
9e320a3db8Add descriptions for a bunch of async tasks, remove logging during thread::quit to avoid crashes for now until we cleanup thread quit code
dnotestein
2014-07-27 00:08:35 -0400
3be05ef822Merge branch 'master' of github.com:InvictusInnovations/fc
Vikram Rajkumar
2014-07-26 22:29:22 -0400
b460fd6b41Cleanup all async tasks on exit, thread safety, work in progress.
Eric Frias
2014-07-26 18:22:38 -0400
600ae24657separate one try/catch into two blocks during file_appender destructor
Eric Frias
2014-07-26 15:05:26 -0400
24ba357b0dMake future's cancel_and_wait automatically swallow the canceled_exception since it is expected.
Eric Frias
2014-07-26 14:51:48 -0400
c208a968b2Fix ntp on win32
Eric Frias
2014-07-25 14:40:47 -0400
8fff034711Fix linux clang compilation
Vikram Rajkumar
2014-07-24 15:33:56 -0400
34296fbb4aEliminate local variable that was shadowing data member variable stack_ctx in context object, which resulted in an assert when the context object was destructed.
dnotestein
2014-07-24 15:18:53 -0400
a254e5ff28Merge branch 'master' of github.com:InvictusInnovations/fc
Nathan Hourt
2014-07-23 11:59:48 -0400
523fa56d88Bugfix: Incorrect ordering of newline and carriage return in HTTP server
Nathan Hourt
2014-07-23 11:56:57 -0400
9aa7700d06Fix for Linux needed to build Keyhotee.
Gandalf-the-Grey
2014-07-23 10:15:46 -0400
4890351b34Added OpenSSL configuration file path. (qt_wallet issue #10 Some clients on Windows 7 quit/crash on start)
PaulEU
2014-07-23 00:18:09 +0200
2d51fd7321Fix compile fc on Win64 tcp_socket needs a bit (two dozens of) more space.
Gandalf-the-Grey
2014-07-22 10:04:55 -0400
eb022cef27Merge branch 'master' of github.com:InvictusInnovations/fc
Nathan Hourt
2014-07-22 10:00:25 -0400
0a1011ddc9Fix win32 compile (increase size of tcp_socket)
Eric Frias
2014-07-21 10:40:21 -0400
6ef73a4198reduce default stack size by 50% to 4x default from 8x
Daniel Larimer
2014-07-17 23:03:23 -0400