Deleting all pending tasks in celery / rabbitmq
How can I delete all pending tasks without knowing the task_id for each task? 10 Answers 10
How can I delete all pending tasks without knowing the task_id for each task? 10 Answers 10
In C# and TPL (Task Parallel Library), the Task class represents an ongoing work that produces a value of type T. I’d like to know what is the need for the Task.FromResult method ? That is: In a scenario where you already have the produced value at hand, what is the need to wrap it … Read more
Is there a ‘standard’ way to specify that a task continuation should run on the thread from which the initial task was created? Currently I have the code below – it is working but keeping track of the dispatcher and creating a second Action seems like unnecessary overhead. dispatcher = Dispatcher.CurrentDispatcher; Task task = Task.Factory.StartNew(() … Read more
I am trying to create a custom rake task, but it seems I dont have access to my models. I thought this was something implicitly included with rails task. I have the following code in lib/tasks/test.rake: namespace :test do task :new_task do puts Parent.all.inspect end end And here is what my parent model looks like: … Read more
I would like to ask you on your opinion about the correct architecture when to use Task.Run. I am experiencing laggy UI in our WPF .NET 4.5 application (with Caliburn Micro framework). Basically I am doing (very simplified code snippets): public class PageViewModel : IHandle<SomeMessage> { … public async void Handle(SomeMessage message) { ShowLoadingAnimation(); // … Read more
This question already has answers here: What is the difference between task and thread? (8 answers) Closed 6 years ago. I’m new to parallel programming. There are two classes available in .NET: Task and Thread. So, my questions are: What is the difference between those classes? When is it better to use Thread over Task … Read more
I have an async method which returns no data: public async Task MyAsyncMethod() { // do some stuff async, don’t return any data } I’m calling this from another method which returns some data: public string GetStringData() { MyAsyncMethod(); // this generates a warning and swallows exceptions return “hello world”; } Calling MyAsyncMethod() without awaiting … Read more