» Home » Task » Page 1
In Task Parallel Library: How to defer Task.TaskFactory.FromAsync task execution?
Category : Programming Languages

I have a method that returns a task like:


public static Task<int> SendAsync(this Socket socket, byte[] buffer, int offset, int count)
{
if (socket == null) throw new ArgumentNullException("socket");
if (buffer == null) throw new ArgumentNullException("buffer");
return Task.Factory.FromAsync<int>(
socket.BeginSend(buffer, of

View Replies


Does Task.Wait(int) stop the task if the timeout elapses without the task finishing?
Category : Programming Languages

I have a task and I expect it to take under a second to run but if it takes longer than a few seconds I want to cancel the task.


For example:


Task t = new Task(() =>
{
while (true)
{
Thread.Sleep(500);
}
});
t.Start();
t.Wait(3000);

Not


View Replies


Celery: Executing a task after another task, but return the result of the first task
Category : Programming Languages

Sometimes I need to run task B after task A, but return the result of task A. Looking at the docs, I have tried to (Avoid launching synchronous subtasks)


So I would use a chain, like this:


@celery.task
def A():
return 5
@celery.task
def B():
return 2
def do_all():
chain = A.s() | B.s()
chain()
return res

View Replies


How to get the classes task for a JavaExec task in gradle to depend on another task?
Category : Java

Is this even possible? I have something like:


task taskB(dependsOn: taskA) {
// Do stuff.
}
task taskA {
// Do stuff.
}
task runClass(dependsOn: 'classes', type: JavaExec) {
main = 'com.some.package.MainClass'
classpath = some.classpath
}

I want to run taskB before classes


View Replies


In Rally: Can I map custom task states to existing Task states in a Rally Task Board (similar to Kanban for user stories)?
Category : Web Design

What would it take to create a TASK card board with mappable states like Rally's existing Kanban board supports.


I would like to add one or two custom task states: like "ready to merge" and "unit test complete". The existing task board doesn't support this feature.


I played with the card board code using the Rally 2.0 SDK (preview) and was able to quickly display tasks


View Replies


Java task queue, threadpool and threads with callback to inform when a new task can start
Category : Development Tools & Services

I have tried to find a way how to load several web pages in multiple threads with a certain maximum limit of threads, in a way such that a new page is loaded when one finish. There should also be another post-processing threads for the loaded content after the page is downloaded so that the whole process is chained.


How I'd like to make it:


Task queue holds the pages that s

View Replies


Invoking Rake::Task in rails causes “Don't know how to build task…”
Category : Web Design

Trying to integrate some friendly_id gem functionality on a controller method.


Essentially, I have a Market object, which has its URL created based on a custom method. Since it's based on a custom method, friendly_id won't update the URL when the Market object gets updated. Friendly_id does offer a redo_slugs rake task, but when I call it from within my controller, it tells me tha


View Replies


Running Basic Laravel Task in Routes.php - “Sorry, can't find that task.”
Category : Programming Languages

I'm trying to setup a Laravel task to eventually be called as a cron job using the artisan interface.


In trying to get a simple task working, I keep getting the error that Laravel can't find that task: "Sorry, can't find that task."


Is this a problem with my version? I'm using a version downloaded less than a month ago which I know is at least v3.0 but I don't know how t


View Replies


An unhandled exception in Mapper or Reducer Task would make the task failed?
Category : Coding

I am wondering if an unhandled exception in a mapper task (or a reducer task) would make the task failed or only the particular input pair of the time would be ignored? I guess it is the former but not so sure.


View Replies


In linux scheduler, does it track the current sleeping task or killed task?
Category : Operating Systems

I know when a task runs, it is enqueued into the running queue. When it sleeps, it is dequeued from the running queue. But is there a queue for sleeping tasks? I didn't see this in the source code.


And even if I were to create such a queue, how can I know when a task is killed and should be removed from the sleeping queue?


Can anyone give me a hint? Thanks,


View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .