I'm not crazy about how using the Application trait works at the moment. I think it needs to not be a trait for the application itself, but a never-constructed type that exists just to provide information to modalkit. I'm going to rename it to be ApplicationInfo.
I also don't like how using the SharedStore works at the moment. I have found it easy to end up in awkward situations in iamb where the store mutex gets acquired twice in the same thread, and crashes. The EditBuffer and widgets shouldn't hold onto a reference to the store, but instead should get passed a mutable reference during editing actions. This should simplify locking in iamb, and also allow applications to choose whether they even want to wrap it in a mutex. (For example, I'm going to make it so that the readline module doesn't wrap the Store at all, since it's single-threaded and won't need it.)
I'm not crazy about how using the
Application
trait works at the moment. I think it needs to not be a trait for the application itself, but a never-constructed type that exists just to provide information to modalkit. I'm going to rename it to beApplicationInfo
.I also don't like how using the
SharedStore
works at the moment. I have found it easy to end up in awkward situations in iamb where the store mutex gets acquired twice in the same thread, and crashes. TheEditBuffer
and widgets shouldn't hold onto a reference to the store, but instead should get passed a mutable reference during editing actions. This should simplify locking in iamb, and also allow applications to choose whether they even want to wrap it in a mutex. (For example, I'm going to make it so that thereadline
module doesn't wrap theStore
at all, since it's single-threaded and won't need it.)