axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Mantaut (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2C-1634) Env management in hash
Date Thu, 11 Apr 2013 22:05:17 GMT

    [ https://issues.apache.org/jira/browse/AXIS2C-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13629457#comment-13629457
] 

Alex Mantaut commented on AXIS2C-1634:
--------------------------------------

I proposed 2 ways to solve the issue while keeping the interface:

- The first one (which modifies the least ammount of code) is to simply ignore the env parameter,
only using it to determine whether to use an internal iterator or not in those axutil_hash_first()
and axutil_hash_next() It has the drawback of having to pass an obsoleted parameter, and if
some developer forgets that it doesn't have to use the external parameter it can reopen the
issue...

- The second one is to create a second interface that doesn't have the unnecesary env parameter...
It involves a lot more code modification, but in the end I think it makes a better interface...

Please let me know if any changes need to be done on the issue...
                
> Env management in hash
> ----------------------
>
>                 Key: AXIS2C-1634
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1634
>             Project: Axis2-C
>          Issue Type: Sub-task
>          Components: core/engine
>    Affects Versions: 1.7.0
>            Reporter: Alex Mantaut
>              Labels: patch
>         Attachments: hash_env_option1.patch, hash_env_option2.patch
>
>
> It seems that axutil_hash was modified to have a reference of the environment, but its
use is not consistent across the hash interface...
> This means that you can create the hash and work with one environment at first (creating
variables and such) and then switch to another environment, releasing the variables in other
environment, this could cause problems with the allocator... (this happens specially when
you use multiple threads, with an 
> environment for every thread)
> The solution I've found is to uniformize the interface, just set the environment at first
and then use the same environment until destroying the hash (because the hash increses the
ref count of the environment it is sure the environment stored exists) 
> If you copy or create a new hash you will have to set the environment for the new hash...
> I looked through all the calls of the hash in the code and it works fine (I know it is
a big patch, but I think is usefull)
> Please let me know if any changes need to be done on the issue

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org


Mime
View raw message