Forum Discussion
nghiale-tr
Apr 28, 2025Copper Contributor
Durable Functions
I'm pretty new to Durable Functions. I have a question regarding terminating them. So we have an application that iterates through azure storage blobs. 0-n # of blobs where n is pretty much unbou...
Kidd_Ip
Apr 30, 2025MVP
Try this to in C# to implement cancellation tokens in your activity functions
public async Task MyActivityFunction(CancellationToken cancellationToken)
{
while (!cancellationToken.IsCancellationRequested)
{
// Perform work here
}
}
nghiale-tr
Apr 30, 2025Copper Contributor
Thanks for the reply. Yes, I think I need to refactor my entire application to use async Tasks, then orchestrate the functions. As the way I'm doing them with Threads doesn't seem to match the way it was intended to be used.