task

How does the Gradle runtime configuration for a task differ from the configuration for a filter?

大城市里の小女人 提交于 2020-05-17 06:56:11
问题 I've implemented a Groovy wrapper around some code to instantiate that code as a Gradle (6.2.2) Task: task xprocTest(type: XMLCalabashTask) { input("source", "../src/test/resources/source.xml") output("result", "/tmp/x/result.xml") pipeline "pipe.xpl" } The underlying code searches the classpath for classes with a particular annotation. That works fine and finds about 97 classes so annotated. I'm trying to implement a wrapper (in Java this time, if that's relevant) around the same code to

How to extend the behavior of a Gradle task for a new task type?

痞子三分冷 提交于 2020-05-14 17:20:35
问题 I would like to set a few things for a few test tasks. More specifically, I would like to add a few environment variables and a few system properties, maybe a few other things such as "dependencies" or "workingDir". With the regular Test task I can do this, task test1(type:Test, dependsOn:[testPrep,testPrep1]){ workingDir testWorkingPath systemProperty 'property','abs' environment.find { it.key ==~ /(?i)PATH/ }.value += (System.properties['path.separator'] + myLibPath) environment.LD_LIBRARY

How to extend the behavior of a Gradle task for a new task type?

倾然丶 夕夏残阳落幕 提交于 2020-05-14 17:20:12
问题 I would like to set a few things for a few test tasks. More specifically, I would like to add a few environment variables and a few system properties, maybe a few other things such as "dependencies" or "workingDir". With the regular Test task I can do this, task test1(type:Test, dependsOn:[testPrep,testPrep1]){ workingDir testWorkingPath systemProperty 'property','abs' environment.find { it.key ==~ /(?i)PATH/ }.value += (System.properties['path.separator'] + myLibPath) environment.LD_LIBRARY

Delete a Jenkins Build via GUI

久未见 提交于 2020-05-10 07:02:16
问题 How can I delete a build from the Jenkins GUI? I know that I can delete the directory from the 'jobs' folder, but I want to do it from the GUI. Is it also possible to delete multiple builds? 回答1: If you go into the build you want to delete and if you have the permissions to delete, then you will see on the upper right corner a button "Delete this build". 回答2: To delete any job from Gui,Go to your job and on left side,click on delete project. 回答3: For deleting the entire build history you can

Problem with calling 4 async method paralel in constructor [closed]

霸气de小男生 提交于 2020-05-09 17:29:08
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last month . I have a problem with tasks in c#, and don't know how to use async await . I have 4 methods, something like: private async Task Name(parameters) {} How can I run all 4 methods simultaneously in the constructor, to reduce the execution time and optimize cpu usage. I tried Parallel.Invoke(() => but

Problem with calling 4 async method paralel in constructor [closed]

冷暖自知 提交于 2020-05-09 17:29:07
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last month . I have a problem with tasks in c#, and don't know how to use async await . I have 4 methods, something like: private async Task Name(parameters) {} How can I run all 4 methods simultaneously in the constructor, to reduce the execution time and optimize cpu usage. I tried Parallel.Invoke(() => but

Start a Task in the Form Shown event

孤者浪人 提交于 2020-05-09 05:56:02
问题 I want to bind a ComboBox to an EF Core entity of 53k rows. This takes some time, around 10 seconds. I thought that if I put the binding process in the Form Shown event, the UI will stay responsive. But this was not the case. What I've tried: Private Sub frmCerere_Shown(sender As Object, e As EventArgs) Handles Me.Shown Task.Factory.StartNew(Sub() GetProducts(cmbProduse), TaskCreationOptions.LongRunning) End Sub Public Shared Sub GetProducts(ctrl As ComboBox) Using context As EnsightContext =

Parallelizing recursion in a for-loop using readdir

二次信任 提交于 2020-05-08 19:47:17
问题 I'd like to parallelize a C-program which recursively calculates the size of a directory and its sub-directories, using OpenMP and C. My issue is, that when I get into a directory using opendir , and I iterate through the sub-directories using readdir I can only access them one by one until I've reached the last sub-directory. It all works well sequentially. When parallelizing the program, however, I think it would make sense to split the number of sub-directories in half (or even smaller

Switch new Task(()=>{ }) for Func<Task>

◇◆丶佛笑我妖孽 提交于 2020-04-30 06:31:32
问题 In an answer to one of my other questions, I was told that use of new Task(() => { }) is not something that is a normal use case. I was advised to use Func<Task> instead. I have tried to make that work, but I can't seem to figure it out. (Rather than drag it out in the comments, I am asking a separate question here.) My specific scenario is that I need the Task to not start right when it is declared and to be able to wait for it later. Here is a LinqPad example using new Task(() => { }) .

Task.Run doesn't execute [closed]

孤人 提交于 2020-04-17 22:01:16
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 9 days ago . My 64bit application uses Tasks a lot and now I appear to have a situation in which Task.Run isn't executed. The ThreadPool has 32768 threads AFAIK and I cannot imagine that all of these are used. What could prevent Task.Run from executing? And how can I diagnose the problem? UPDATE Before reading