task

package
v1.1.0-beta.0...-2610521 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StackTaskPool = sync.Pool{
	New: func() any {
		return newTaskStack()
	},
}

StackTaskPool is initialized for memory saving by reusing taskStack.

Functions

This section is empty.

Types

type Scheduler

type Scheduler interface {
	ExecuteTasks()
}

Scheduler is a scheduling interface defined for serializing(single thread)/concurrent(multi thread) running.

type SchedulerContext

type SchedulerContext interface {
	// contains filtered or unexported methods
}

SchedulerContext is defined for scheduling logic calling, also facilitate interface-oriented coding and testing.

type SimpleTaskScheduler

type SimpleTaskScheduler struct {
	Err          error
	SchedulerCtx SchedulerContext
}

SimpleTaskScheduler is defined for serializing scheduling of memo tasks.

func (*SimpleTaskScheduler) ExecuteTasks

func (s *SimpleTaskScheduler) ExecuteTasks()

ExecuteTasks implements the interface of TaskScheduler.

type Stack

type Stack interface {
	Push(one Task)
	Pop() Task
	Empty() bool
	Destroy()
}

Stack is abstract definition of task container.(TaskStack is a kind of array stack implementation of it)

type Task

type Task interface {
	// contains filtered or unexported methods
}

Task is an interface defined for all type of optimizing work: exploring, implementing, deriving-stats, join-reordering and so on.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL