Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COArgh, that's disappointing. I'd like my undo/redo stack to persist between app sessions so I need to get these stacks saved to disk at some point. Command objects can grow to quite a size as well so I'll need to have a background process writing them to disk as they are created. With unpredictable IO write times though, it's not obvious how I can make sure I get everything written to disk by the time onPause is called if my application is interrupted. The situation is even worse if I need to call .sync() as well on each file. Any advice?
      singulars
    2. CO@rebeccamaher: "Command objects can grow to quite a size as well so I'll need to have a background process writing them to disk as they are created." -- a background *thread* please. Consider using a `LinkedBlockingQueue` with a thread receiving mementos on the queue and writing them to flash as they arrive. "it's not obvious how I can make sure I get everything written to disk by the time onPause is called if my application is interrupted." -- your background thread will not be impacted by calls to `onPause()`.
      singulars
    3. COOops, I meant thread. Thanks for the references! Aren't there any problems running a thread when another activity comes to the front? Isn't the thread likely to get killed? Thanks for the tips, I can give this idea a try. My only issue is minimising the data to be saved so that, if I cannot save the data to disk fast enough, I won't have to toss too many commands away.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload