Commit Graph

78 Commits

Author SHA1 Message Date
JustArchi
0370168b02 Happy new year 2020-02-01 23:33:35 +01:00
JustArchi
178ca64cfa Implement non-blocking IO saving for databases 2019-07-25 17:09:20 +02:00
JustArchi
32e0de5a70 Implement basic logic for #1299 2019-06-30 23:33:50 +02:00
JustArchi
3e4a08d81c Misc 2019-04-04 22:34:58 +02:00
JustArchi
44c5bf4ad5 Misc 2019-04-04 17:56:38 +02:00
JustArchi
b677ba8202 Code/style cleanup 2019-02-16 17:34:17 +01:00
JustArchi
a48510b765 Open global database for public API 2019-01-17 20:43:45 +01:00
JustArchi
e1e9a9f457 Rider cleanup 2019-01-14 19:11:17 +01:00
JustArchi
3547f09464 Deconstruct KeyValuePairs globally
And add support for doing this in .NET Framework
2019-01-11 00:16:20 +01:00
JustArchi
192656cd02 Implement basic code contracts 2019-01-10 23:44:32 +01:00
JustArchi
7a3f6ddef9 Avoid serializing default properties in databases
Less data to read/write is always better.
2019-01-02 18:24:25 +01:00
JustArchi
3bbddcf723 Happy new year 🎉 2019-01-02 16:32:53 +01:00
JustArchi
f8aa8babcf R# cleanup 2018-12-15 00:27:15 +01:00
JustArchi
7c3cbc03f8 Remove default config files 2018-10-07 03:21:32 +02:00
JustArchi
a04fb33343 Structure cleanup 2018-09-08 01:03:55 +02:00
JustArchi
9534d2b9f0 R# cleanup 2018-09-08 00:46:40 +02:00
JustArchi
16d002f99b Misc code cleanup 2018-07-27 04:52:14 +02:00
JustArchi
34b609e6f0 Use new ToHashSet() method 2018-06-09 00:45:15 +02:00
Łukasz Domeradzki
a515de5807 Implement support for mono (#806)
* Initial buggy mono support

* Start building generic-netf variant

* Fix CIs

* Disable ILLink.Tasks for generic-netf

* Make generic-netf *special*

* Keep fixing

Don't ask me why reverse order works, this is next-gen msbuild magic

* Mono compat

* Mono compat

* Misc

* Update to .NET Framework 4.7.2

* .NET 4.7.2 compat

* Misc
2018-06-03 07:51:20 +02:00
JustArchi
cbfc7d0e42 Accelerate initial bots startup
Files can be read in parallel after all
2018-05-13 19:19:27 +02:00
JustArchi
20926ee14e ReSharper code review 2018-04-21 21:52:04 +02:00
JustArchi
3682eefc02 Code review 2018-03-09 15:43:25 +01:00
JustArchi
60005f895f Misc 2018-02-25 18:36:17 +01:00
JustArchi
d51752d577 Misc 2018-02-25 17:54:24 +01:00
JustArchi
cc1f99d5d4 Misc 2018-01-02 08:19:37 +01:00
JustArchi
6916d2c070 Misc 2018-01-02 08:16:41 +01:00
JustArchi
c515bd9241 Misc 2018-01-02 08:11:35 +01:00
JustArchi
6bbff6ab4e Happy new year 2018-01-01 02:56:53 +01:00
JustArchi
0e65122f7b Misc 2017-12-30 21:29:24 +01:00
JustArchi
434edd6667 Closes #709 2017-12-30 21:28:01 +01:00
JustArchi
d5f44f8f6c ReSharper: update header 2017-11-18 17:27:06 +01:00
JustArchi
8019cdcbb4 Code review according to Jeffrey Richter
> The pattern is to take the basest class or interface possible for your arguments and return the most specific class or interface possible for your return types. This gives your callers the most flexibility in passing in types to your methods and the most opportunities to cast/reuse the return values.
2017-11-16 22:10:11 +01:00
JustArchi
f423f35c62 Further fix 2017-08-21 15:16:55 +02:00
JustArchi
388c72052c Misc optimization
I had to miss this one.
2017-08-10 00:05:00 +02:00
JustArchi
6aa5a633e4 async/dispose code review 2017-08-04 19:26:37 +02:00
JustArchi
f24be67c8c Bunch of stuff for #605 2017-08-01 12:41:57 +02:00
JustArchi
7bb3b38ea4 Closes #522 2017-07-23 10:27:20 +02:00
JustArchi
15ec01f447 Finish leftovers from previous commit 2017-07-21 14:25:25 +02:00
JustArchi
f564cc5ebb Update ASF base code to SK 2.0 alpha5
There is a lot of changes in this one, I like how we got rid of SteamProtocol and got SteamProtocols instead.
2017-07-21 02:13:03 +02:00
JustArchi
f4187e194e Various bugfixes 2017-07-10 17:07:48 +02:00
JustArchi
589f4f5746 Improve I/O database code
This should lead to less file corruptions.
2017-07-07 07:33:31 +02:00
JustArchi
adfc992f26 Resharper Cleanup v2 2017-04-05 17:23:18 +02:00
JustArchi
fcf9686a79 Revert "Resharper cleanup"
This reverts commit 7c8d7b5ada.

Bad cleanup.
2017-04-05 17:01:18 +02:00
JustArchi
7c8d7b5ada Resharper cleanup 2017-04-05 16:59:48 +02:00
Logerfo
e4da0c05d5 Merge branch 'master' into master 2017-04-05 10:33:13 -03:00
JustArchi
bac1bc6903 Closes #502 2017-03-16 10:04:49 +01:00
JustArchi
8980667620 Misc 2017-03-15 08:34:21 +01:00
JustArchi
9f1df5de80 Assert on invalid json being saved 2017-03-15 08:33:38 +01:00
Bruno Logerfo
f8b2fcda7a C# 7.0 syntax sugars 2017-03-14 08:20:29 -03:00
JustArchi
a8045ac50b Fix async/await with ConcurrentHashSet
Now this is a nice bug that was found accidentally by ArchiBoT...
ReaderWriterLockSlim() is very decent solution, but it's thread-based, and we're using our ConcurrentHashSet in mixed async/sync context. This means that if we use something like:
foreach (var item in concHashSet) {
    await AnythingAsync().ConfigureAwait(false);
}
It's totally possible that we'll request read lock as thread 1, and release the read lock as thread 2, which will lead to RWLock exception => System.Threading.SynchronizationLockException: The read lock is being released without being held.
Fortunately it looks like we didn't have any scenario like this in ASF, as this was possible only when we async/await while enumerating over ConcurrentHashSet, so that specific bug didn't affect ASF codebase (yet). Still, I must fix this as current implementation is not thread-safe, so our HashSet is in fact not concurrent in the first place.
I analyzed possible solutions and there are basically 3: either using ConcurrentDictionary and wrapping around it, replacing lock with SemaphoreSlim, or using third-party AsyncReaderWriterLock from StephenCleary. SemaphoreSlim entirely kills the concept of multiple readers one writer, and could affect performance negatively, moreover - it doesn't support upgreadable lock scenario we have with ReplaceIfNeededWith(). Concurrent dictionary would be nice if I didn't have that awful memory hit from storing mandatory pointless value, plus I don't really like concept of wrapping around conc dictionary if I can simply use it right away and drop my conc hashset entirely. AsyncReaderWriterLock seem to be really well written, and works on Mono + should be compatible with .NET core in the future, so we should go for it as it's the best bet both performance-wise and memory-wise.
This brings another package dependency and changes a bit backend of ConcurrentHashSet
2017-02-07 20:14:51 +01:00