mirror of
https://code.sup39.dev/repos/Wqawg
synced 2025-01-15 15:15:08 +09:00
6df2200f47
- Fork and async are no longer class methods, which simplifies things a lot and allows for many more trivial instances, much like with MonadHandler. Fork and async are still available, but instead of unnecessarily being class methods, they are now provided as follows: You can fork and async a worker (no more fork/async for handler, because I never actually need that, and not sure there's ever a need for that in general), and you can do that from any MonadSite. So, you can fork or async a worker from a Handler, from a Worker, from a ReaderT on top of them e.g. inside runDB, and so on. - Following the simplification, new MonadSite instances are provided, so far just the ones in actual use in the code. ReaderT, ExceptT and lazy RWST. More can be added easily. Oh, and WidgetFor got an instance too. In particular, this change means there's no usage of `forkHandler` anymore, at all. I wonder if it ever makes a difference to `forkWorker` versus `forkHandler`. Like, does it cause memory leaks or anything. I guess could check why `forkResource` etc. is good for in `forkHandler` implementation. I suppose if needed, I could fix possible memory leaks in `forkWorker`. |
||
---|---|---|
.. | ||
Auth | ||
Paginate | ||
Persist | ||
ActivityPub.hs | ||
FedURI.hs | ||
Hashids.hs | ||
MonadSite.hs | ||
RenderSource.hs | ||
SessionEntity.hs |