mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: Run network callbacks on the ThreadPool
This commit is contained in:
parent
a7ff558ed7
commit
3b891e9e8d
1 changed files with 5 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reactive.Concurrency;
|
||||
using System.Reactive.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -269,6 +270,7 @@ internal class NetworkHandlers : IDisposable, IServiceType
|
|||
.And(this.OnMarketBoardListingsBatch(startObservable))
|
||||
.Then((request, sales, listings) => (request, sales, listings)))
|
||||
.Where(this.ShouldUpload)
|
||||
.SubscribeOn(ThreadPoolScheduler.Instance)
|
||||
.Subscribe(
|
||||
data =>
|
||||
{
|
||||
|
|
@ -314,6 +316,7 @@ internal class NetworkHandlers : IDisposable, IServiceType
|
|||
{
|
||||
return this.OnMarketTaxRates()
|
||||
.Where(this.ShouldUpload)
|
||||
.SubscribeOn(ThreadPoolScheduler.Instance)
|
||||
.Subscribe(
|
||||
taxes =>
|
||||
{
|
||||
|
|
@ -340,6 +343,7 @@ internal class NetworkHandlers : IDisposable, IServiceType
|
|||
return this.OnMarketBoardPurchaseHandler()
|
||||
.Zip(this.OnMarketBoardPurchase())
|
||||
.Where(this.ShouldUpload)
|
||||
.SubscribeOn(ThreadPoolScheduler.Instance)
|
||||
.Subscribe(
|
||||
data =>
|
||||
{
|
||||
|
|
@ -370,6 +374,7 @@ internal class NetworkHandlers : IDisposable, IServiceType
|
|||
private unsafe IDisposable HandleCfPop()
|
||||
{
|
||||
return this.OnCfNotifyPop()
|
||||
.SubscribeOn(ThreadPoolScheduler.Instance)
|
||||
.Subscribe(
|
||||
message =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue