aboutsummaryrefslogtreecommitdiff
path: root/worker
diff options
context:
space:
mode:
authorKevin Kuehler <keur@xcf.berkeley.edu>2019-10-10 15:27:07 -0700
committerBen Burwell <ben@benburwell.com>2019-10-12 20:56:39 -0400
commit8cb4a9d751d1497e1059fedb03964bc9e56e5c06 (patch)
treea0d9a94e170f3d0fc0ed949460bdbb94c65ece06 /worker
parentf1b365dfc30b7253f3baea270ebcc8d1fb754db9 (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.go10
-rw-r--r--worker/types/thread.go6
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
+}