Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 98284d9

Browse files
committed
Fixed Architecture docs
1 parent 198b2a0 commit 98284d9

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

docs/Architecture.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,20 @@ fresh data is generated when first requested.
113113
## Dispatcher and messaging
114114

115115
```haskell
116-
dispatcherP :: forall m. TChan (PluginRequest m)
117-
-> IdePlugins
118-
-> GM.Options
119-
-> DispatcherEnv
120-
-> ErrorHandler
121-
-> CallbackHandler m
122-
-> IO ()
116+
runScheduler
117+
:: forall m
118+
. Scheduler m
119+
-> ErrorHandler
120+
-> CallbackHandler m
121+
-> C.ClientCapabilities
122+
-> IO ()
123+
124+
sendRequest
125+
:: forall m
126+
. Scheduler m
127+
-> Maybe DocUpdate
128+
-> PluginRequest m
129+
-> IO ()
123130

124131
type PluginRequest m = Either (IdeRequest m) (GhcRequest m)
125132

@@ -139,8 +146,8 @@ data IdeRequest m = forall a. IdeRequest
139146

140147
```
141148

142-
`dispatcherP`(thread #3) listens for `PluginRequest`s on the `TChan` and executes the
143-
`pinReq`, sending the result to the `pinCallback`. `pinDocVer` and `pinLspReqId` help us
149+
`runScheduler`(thread #3) waits for requests sent through `sendRequest` and executes the
150+
`pinReq`. Sending the result to the `pinCallback`. `pinDocVer` and `pinLspReqId` help us
144151
make sure we don't execute a stale request or a request that has been cancelled by the IDE.
145152
Note that because of the single threaded architecture, we can't cancel a request that
146153
has already started execution.

0 commit comments

Comments
 (0)