Core problems:
1) not enough information available to method to ensure it can produce a unique thread name.
2) should be TaskName not ThreadName, so that it's synchronous/asyncrhonous agnostic.
Initial recommendation: some combination of features of following
@TaskName annotation on task that takes optional attributes:
- String name: full name of task (velai leaves as is, without adding unique id)
- String namePrefix: velai adds unique id as suffix
- String nameSuffix: velai adds unique id as prefix
- String nameFormat: velai inserts {0} as the unique task id
@TaskName on method, method any of following forms:
String taskName(): velai treats as full name
String taskName(int taskId): method given unique id and can do what it likes
@TaskName on method, method has access to ExecutionContext object??
With limited methods available???