DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Singleton module to cloneable?

Hi,

 

is there an easy way to convert a singleton to cloneable? (a way less important question: why singletons exist at all? Wouldn't it be easier to create everything as cloneable and use one instance if the module is intended to work as a singleton? I guess cloneables probably introduce a bit more of an overhead, but not sure if thats the reason behind)

 

Thx.

0 Kudos
Message 1 of 4
(506 Views)

As far as I can tell it would still be a manual process of recreating all of the functionality in a cloneable module.

 

There is extra complexity and overhead involved. But, I think the main decider would be whether the module creator wants the module to be accessed as a singleton or clone. Just like when you're working with a subVI you decide how you want Reentrancy to be handled. (And I think the Reentrancy of Main.vi is being changed for singleton vs. cloneable).

Message 2 of 4
(479 Views)
Wouldn't it be easier to create everything as cloneable and use one instance if the module is intended to work as a singleton? I guess cloneables probably introduce a bit more of an overhead, but not sure if thats the reason behind)

This was discussed in another question you asked here: https://forums.ni.com/t5/DQMH-Consortium-Toolkits/Are-singleton-modules-justified/m-p/4279937

0 Kudos
Message 3 of 4
(458 Views)

I had the feeling that I may had this question before, but then I said nah... Kudos to you for your well functioning memory-cells 🙂

0 Kudos
Message 4 of 4
(447 Views)