pmndrs / directed

A flexible, minimal scheduler written in TypeScript
MIT License
27 stars 1 forks source link

Overriding a runnable via ID #6

Open krispya opened 4 months ago

krispya commented 4 months ago

This idea came from @pietrovismara. An ID is currently only used for debug, but it also allows an alias for overriding. This would be useful for mocking during tests, but also for ecosystem integration where you can override a runnable that is loaded by another library.

akdjr commented 4 months ago

Interestingly enough, I was debating changing the underlying dag to have nodes identified by an ID instead of the function itself. That change would allow ID based overriding.