This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using Akka.Actor; | |
using Akka.Cluster; | |
using Akka.DistributedData; | |
namespace Worker.Receiver.Deduplication.DData | |
{ | |
public abstract class DeduplicatingReceiverBase : ActorBase | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// based heavily on https://github.com/noseratio/tpl/blob/master/ThreadAffinityTaskScheduler.cs | |
// //----------------------------------------------------------------------- | |
// // <copyright file="ThreadAffinityDispatcher.cs" company="Akka.NET Project"> | |
// // Copyright (C) 2009-2020 Lightbend Inc. <http://www.lightbend.com> | |
// // Copyright (C) 2013-2020 .NET Foundation <https://github.com/akkadotnet/akka.net> | |
// // </copyright> | |
// //----------------------------------------------------------------------- | |
using System.Threading.Tasks; | |
using System.Runtime.InteropServices; | |
using System; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using Akka.Actor; | |
using Akka.Pattern; | |
using Akka.Streams.Dsl; | |
using LanguageExt; | |
namespace Akka.Persistence.Sql.Linq2Db.Journal.DAO | |
{ | |
public class BatchFlowControl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Akka; | |
using Akka.Streams; | |
using Akka.Streams.Dsl; | |
namespace GlutenFree.Akka.Streams.AsyncEnumerable | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Numerics; | |
namespace Common | |
{ | |
/// <summary> | |
/// Arbitrary precision decimal. | |
/// All operations are exact, except for division. Division never determines more digits than the given precision. | |
/// Source: https://gist.github.com/JcBernack/0b4eef59ca97ee931a2f45542b9ff06d | |
/// Based on https://stackoverflow.com/a/4524254 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
public class ThreadStatGatherer : IDisposable | |
{ | |
private List<int> ThreadStats = new List<int>(); | |
private CancellationTokenSource runningCts = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Akka.Streams.Dsl; | |
using LinqToDB; | |
using LinqToDB.Data; | |
namespace Akka.Persistence.Sql.Linq2Db.Streams | |
{ | |
public class ReaderSource<T> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using Akka; | |
using Akka.Streams; | |
using Akka.Streams.Dsl; | |
using Akka.Util; | |
using Google.Protobuf; | |
using Grpc.Core; | |
namespace GrpcAkkaStreamHelpers | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Reactive.Streams; | |
namespace Akka.Linq2Db.Sandbox | |
{ | |
//THIS IS BACK OF NAPKIN CODE, COMPLETELY UNTESTED. USE AT OWN RISK | |
public class AsyncPublisherContextSubscription<T> : ISubscription | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Noseratio; | |
/// <summary> | |
/// Single thread event loop scheduler, based on Rx <seealso cref="EventLoopScheduler"/> | |
/// but with added SynchronizationContext and TPL TaskScheduler API | |
/// https://gist.github.com/noseratio/22a291e1d69f6d1cea547623ad9c9147 | |
/// </summary> | |
public sealed partial class EventLoopThreadScheduler : | |
TaskScheduler, | |
IScheduler, |
OlderNewer