summary refs log tree commit diff stats
path: root/worker
Commit message (Expand)AuthorAgeFilesLines
...
* Don't parse mail in worker; send a reader insteadDrew DeVault2019-03-312-14/+5
* Pull BodyStructure up from IMAP workerDrew DeVault2019-03-312-9/+25
* Add body fetching support codeDrew DeVault2019-03-293-17/+55
* Implement :delete-messageDrew DeVault2019-03-205-1/+60
* Display message subjects in message listDrew DeVault2019-03-142-0/+48
* Implement message store side of message fetchingDrew DeVault2019-03-142-9/+4
* Fetch valid UIDs from server after opening dirDrew DeVault2019-03-104-94/+76
* Add loading spinnerDrew DeVault2019-01-131-0/+91
* Add name to DirectoryInfo messagesDrew DeVault2019-01-132-2/+4
* Issue IMAP SELECT commandDrew DeVault2019-01-133-1/+52
* Apply gofmtDrew DeVault2018-06-121-1/+2
* fallthrough in worker selectionMarkus Ongyerth2018-06-121-1/+1
* Tidy up list.goDrew DeVault2018-02-021-22/+15
* Refactoring; consume listing responseDrew DeVault2018-02-013-36/+33
* Implement (most of) mailbox listingDrew DeVault2018-02-013-3/+54
* Improve loggingDrew DeVault2018-02-011-6/+20
* Reduce boilerplate in worker/UIDrew DeVault2018-02-013-43/+85
* Add certificate approval flowDrew DeVault2018-01-312-34/+73
* Improve loggingDrew DeVault2018-01-312-7/+26
* Connect to IMAP server, login and idleemersion2018-01-142-11/+113
* Move worker into account tabDrew DeVault2018-01-113-9/+4
* Renderer scaffoldingDrew DeVault2018-01-101-2/+0
* Misc idiomatic fixesemersion2018-01-102-10/+7
* Sleep main and worker loops on idleDrew DeVault2018-01-101-1/+2
* Parse account configurationDrew DeVault2018-01-092-6/+20
* Initial pass on worker/UI message passingDrew DeVault2018-01-093-0/+131
span class="nv">address <- next-input) ; n = 0 (n:integer <- copy 0:literal) { begin (done?:boolean <- less-than n:integer 5:literal) (break-unless done?:boolean) ; other threads might get between these prints ($print (("produce: " literal))) (print-integer nil:literal/terminal n:integer) ($print (("\n" literal))) ; 'box' n into a dynamically typed 'tagged value' because that's what ; channels take (n2:integer <- copy n:integer) (n3:tagged-value-address <- init-tagged-value integer:literal n2:integer) (chan:channel-address/deref <- write chan:channel-address n3:tagged-value-address/deref) (n:integer <- add n:integer 1:literal) (loop) } ]) (function consumer [ ; consume and print integers from a channel (default-space:space-address <- new space:literal 30:literal) (chan:channel-address <- next-input) { begin ; read a tagged value from the channel (x:tagged-value chan:channel-address/deref <- read chan:channel-address) ; unbox the tagged value into an integer (n2:integer <- maybe-coerce x:tagged-value integer:literal) ; other threads might get between these prints ($print (("consume: " literal))) (print-integer nil:literal/terminal n2:integer) ($print (("\n" literal))) (loop) } ]) (function main [ (default-space:space-address <- new space:literal 30:literal) (chan:channel-address <- init-channel 3:literal) ; create two background 'routines' that communicate by a channel (routine1:integer <- fork consumer:fn nil:literal/globals nil:literal/limit chan:channel-address) (routine2:integer <- fork producer:fn nil:literal/globals nil:literal/limit chan:channel-address) (sleep until-routine-done:literal routine1:integer) (sleep until-routine-done:literal routine2:integer) ])