Questions tagged [shared-variable]

A shared-variable is used within multi-threaded software as the name implies; a variable that is shared between threads and in the context of thread safety and using mutexes in mind.

A variable that is to be used by multiple threads or processes. For instance, a variable that can be read by one thread and written to by another within the same program.

42 questions
0
votes
1 answer

Crystal Report - Shared Variables adding last row of data twice in Report Footer

I am using Crystal Reports 2016. I don't do a lot of work with it, and most of what I do, I manage, but have run into a problem that I cannot seem to find a solution to. As an organisation we have customers who commit to donate a certain amount each…
0
votes
0 answers

Shared variable reset formula in header doesn't cause formula in footer to reset

I have this formula in the group footer and it counts accurately. WhilePrintingRecords; shared NumberVar cCount := COUNT({history_client_charge.clientNo}); Then I put this formula in the group header but it doesn't cause my variable to reset.…
isoman4not5
  • 131
  • 14
0
votes
1 answer

Using a shared variable between routes and main in flask

I have a python flask server. In the main of my script, I get a variable from user that defines the mode of my server. I want to set this variable in main (just write) and use it (just read) in my controllers. I am currently using os.environ, but I…
Zeinab Abbasimazar
  • 9,835
  • 23
  • 82
  • 131
0
votes
1 answer

Can I pass information between a CodeActivity (workflow) and a Plugin using SharedVariables in Dynamics 365?

I have a bespoke CodeActivity that gets called by an On Demand Workflow in Dynamics 365. The CodeActivity creates a new Quote which in turns triggers some Plugins that I have registered against the Create message. I'm looking to prevent the plugins…
Equalsk
  • 7,954
  • 2
  • 41
  • 67
0
votes
0 answers

Multiprocessing inside python class

I'm trying to do parallel computation to speed up a for loop (I'm already using itertools, I need more speed since I do the for loop several times). I am new to multiprocessing. I have checked several questions on stack overflow and I tried to solve…
0
votes
0 answers

How to read value of accumulators in worker task in spark?

As per the documentation of accumulators in spark: Note that tasks on worker nodes cannot access the accumulator’s value()—from the point of view of these tasks, accumulators are write-only variables. This allows accu‐ mulators to be implemented…
KayV
  • 12,987
  • 11
  • 98
  • 148
0
votes
2 answers

Angular Components: share variables that need to be changed dynamically

I'm pretty new to Angular so I am not sure of the best way to do this. My app is going to be making a number of sparql queries. Each query is a string that will need to be referenced and manipulated prior to each post. I have two main…
Evan Lalo
  • 1,209
  • 1
  • 14
  • 34
0
votes
1 answer

javafx call controller function from another thread

The question of the day is: how to call controllers function from another thread. My application looks like this: public class Server { //(...) public String setMsg(String string) { msg.set(string+"\n"); …
1337_
  • 23
  • 4
0
votes
1 answer

Why are shared variables cached in CPU caches?

I'm trying to understand the Java Memory Model but have been failing to get a point regarding CPU caches. As far as I know it, in JVM we have the following locations to store local and shared variables: local variables -- on thread stack shared…
0
votes
0 answers

Is there any way to get shared variables or create a similar functionality in parallel programming in C using MPI libraries?

I am trying to implement a map where keys are numbers mapping into unique numbers. In other words, each process holds a set of numbers in an array that map into another set of numbers in another array held by the same process. The mappings need to…
0
votes
1 answer

How to use a Shared-Variable

I want to know your opinion on how I coded my QThread. this part of my code is for handle a PWM for LED display. The purpose of my QThread is to work as smoothly as possible while changing a value in the QThread else i can watch on LED display a…
Johann
  • 23
  • 5
-1
votes
2 answers

How does one store constants in Angular 2+?

This is a follow-up question to an earlier question I posted. My question there was about strange log output I was getting when calling a method on a service. The console.log output was not printing the data that the service clearly defined. The…
CodyBugstein
  • 21,984
  • 61
  • 207
  • 363
1 2
3