Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add convenience objects to use taskit in Bloc #484

Merged
merged 5 commits into from
May 18, 2024
Merged

Add convenience objects to use taskit in Bloc #484

merged 5 commits into from
May 18, 2024

Conversation

tinchodias
Copy link
Collaborator

Created with Pablo last week.

Demo script:

space := BlSpace new.
space
	useMorphicHost;
	extent: 200@200;
	show.

"action 1"
space enqueueTask:
	(BlTaskAction new
		action: [ space root background: Color random ];
		yourself).

"action 2"
runner := TKTBlSpaceRunner on: space.
runner schedule: [ space root background: Color random ] asTask.


"repeatable 1"
space enqueueTask:
	(BlRepeatedTaskAction new
		delay: 250 milliSeconds;
		action: [ space root background: Color random ];
		yourself).

"repeatable 2"
service := TKTParameterizableService new.
service name: 'Change background'.
service step: [
	space enqueueTask: (BlTaskAction new
		action: [space root background: Color random ];
		yourself) ].
service stepDelay: 250 milliSeconds.
service start.
"service stop."

Created with Pablo last week
It is a TaskIt service associated with a Bloc space.
@tinchodias
Copy link
Collaborator Author

tinchodias commented Mar 19, 2024

Demo script of repeatable tasks:

space := BlSpace new.
space extent: 200@200; show.

"repeatable 1"
space enqueueTask:
	(BlRepeatedTaskAction new
		delay: 250 milliSeconds;
		action: [ space root background: Color random ];
		yourself).

"repeatable 2"
service := TKTParameterizableService new.
service name: 'Change background'.
service step: [
	space enqueueTask: (BlTaskAction new
		action: [space root background: Color random ];
		yourself) ].
service stepDelay: 250 milliSeconds.
service start.
"service stop."

"repeatable 3"
service := TKTBlSpaceService on: space.
service step: [ space root background: Color random ].
service stepDelay: 250 milliSeconds.
service start.
"service stop."

@tinchodias
Copy link
Collaborator Author

@labordep I was talking you about this "experiment" on ways to use/specialize TaskIt for Bloc.

@tinchodias tinchodias changed the title A simple #TKTBlSpaceRunner [WIP] Add convenience objects to use taskit in Bloc May 17, 2024
@tinchodias tinchodias marked this pull request as ready for review May 17, 2024 23:04
@tinchodias tinchodias merged commit ea3997e into dev May 18, 2024
12 checks passed
@tinchodias tinchodias deleted the taskitRunner branch May 18, 2024 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant