IRC log for #stepcode on 20140530

04:18.23*** join/#stepcode stirk (~charlie@c-107-2-138-189.hsd1.co.comcast.net)
04:21.25*** join/#stepcode cwstirk (~charlie@c-107-2-138-189.hsd1.co.comcast.net)
07:56.50*** join/#stepcode mpictor (~mark@c-68-58-38-45.hsd1.in.comcast.net)
11:03.33*** join/#stepcode hoiji (671b082a@gateway/web/cgi-irc/kiwiirc.com/ip.103.27.8.42)
12:34.01*** join/#stepcode rigtig181 (7caac741@gateway/web/freenode/ip.124.170.199.65)
15:47.43hoijimpictor: We had a discussion few days ago about, whether we should
15:47.43hoiji(1) use a macro demarcate the thread safe code OR
15:47.43hoiji(2) use a function with different name.
15:48.03hoijiThat time I had argued in the favour of using a function with a different name. My reason for that was, that some of the features become memory hungry when converted to their thread safe form.
15:48.05hoijiHence the decision on whether to use or not to use them should be left to the user.
15:48.17hoijiHowever now, I have encountered some of the functionalites which if made as per option (2) would require a lot of code duplication due to many thread unsafe internal functions.
15:49.09hoijiOne way around that problem is, that in every such internal function we introduce an extra boolean parameter say threadSafeMode, to determine whether the thread safe part or thread unsafe part of the function executes.
15:49.18hoijiBut this might make the code look ugly (as compared to option (1)).
15:49.19hoijiAnother way is that to use option (2) for some functions and option (1) on other.
15:49.31hoijiPlz give your views in this matter. I also apologize for not foreseeing this situtation well in advance. :(
16:02.25*** join/#stepcode cwstirk (~charlie@c-107-2-138-189.hsd1.co.comcast.net)
16:37.42*** join/#stepcode hoiji (671b082a@gateway/web/cgi-irc/kiwiirc.com/ip.103.27.8.42)
17:08.43*** join/#stepcode hoiji (671b082a@gateway/web/cgi-irc/kiwiirc.com/ip.103.27.8.42)
17:32.14starseekerhoiji: do you have any insight as to *why* the memory consumption goes up so much in thread-safe form?
17:33.41starseekerwould suggest, if a parameter is needed, to allow the user to request how *many* threads to use
17:33.56starseekerso n=1 would be single threaded
17:35.27starseekeralso, generally speaking, if you're duplicating code that means we need to pull the duplicated functionality into its own functions/libraries, and have all the places you were duplicating the logic call those functions
17:36.02starseekerwhen you say "thread safe internal functions", by "internal" do you mean from the operating system or from stepcode?
17:36.13starseekerif the latter, could those internal functions be reworked?

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.