diff options
author | Kevin Kuehler <keur@xcf.berkeley.edu> | 2019-10-28 12:07:00 -0700 |
---|---|---|
committer | Ben Burwell <ben@benburwell.com> | 2019-10-29 11:07:21 -0400 |
commit | dca84afbbb050e21214b921ddd50eebc5c690435 (patch) | |
tree | 5cee9fd2328c7a67065e5c6f4b231f83ced257e4 /worker | |
parent | 310bec27024579e7ada35585b3190ab875540804 (diff) |
Start adding thread support
* Add threading-enabled config option
* Add DirectoryThreaded and FetchDirectoryThreaded types to control path
* Add generic thread type for all backends to use
Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
Diffstat (limited to 'worker')
-rw-r--r-- | worker/types/messages.go | 10 | ||||
-rw-r--r-- | worker/types/thread.go | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/worker/types/messages.go b/worker/types/messages.go index 3539139..0b9dc6e 100644 --- a/worker/types/messages.go +++ b/worker/types/messages.go @@ -81,6 +81,11 @@ type FetchDirectoryContents struct { SortCriteria []*SortCriterion } +type FetchDirectoryThreaded struct { + Message + SortCriteria []*SortCriterion +} + type SearchDirectory struct { Message Argv []string @@ -152,6 +157,11 @@ type DirectoryContents struct { Uids []uint32 } +type DirectoryThreaded struct { + Message + Threads []*Thread +} + type SearchResults struct { Message Uids []uint32 diff --git a/worker/types/thread.go b/worker/types/thread.go new file mode 100644 index 0000000..265438f --- /dev/null +++ b/worker/types/thread.go @@ -0,0 +1,6 @@ +package types + +type Thread struct { + Uid uint32 + Children []*Thread +} |