How would I know if it was resolved or not?

On Thursday, 17 May 2012 12:31:50 UTC+2, Krzysztof Koźmic wrote:
>
>  If you resolve it, Windsor will release it as normal.
>
> If you don't resolve it, you'll have to take care of disposing the object 
> yourself. For that I think you'll need some custom infrastructure outside 
> of the container.
>
> @K
>
> On 17/05/2012 8:21 PM, Henrik wrote: 
>
> I know, and I might be barking up the wrong tree, but here's what I want:
> I want to have the instance initialized by the time that I resolve it. If 
> I never resolve it, it needs to be disposed somehow, when the container is 
> disposed. How do I go about coding that? The initialization must happen on 
> a different thread from where the container is initialized, because the 
> initialization takes too long to wait for, but by the time I need the 
> component there would have passed time and it would have had time to 
> initialize completely.
>
> On Thursday, 17 May 2012 11:43:28 UTC+2, Krzysztof Koźmic wrote: 
>>
>>  You're still not resolving it.
>>
>> @K
>>
>> On 17/05/2012 7:36 PM, Henrik wrote: 
>>
>> I hacked one idea together, but it's failing; probably because the kernel 
>> is already on its way out the window.
>>
>> Updated gist: https://gist.github.com/2710007
>>
>> On Thursday, 17 May 2012 11:00:05 UTC+2, Henrik wrote: 
>>>
>>> Yeah, I know, it's grand that it doesn't if you don't initialize them 
>>> like I do.
>>>
>>> But how do I make it touch my object, is the question? :)
>>>
>>> On Thursday, 17 May 2012 10:56:40 UTC+2, Krzysztof Koźmic wrote: 
>>>>
>>>>  It works as expected.
>>>>
>>>> Windsor never touches your object.
>>>>
>>>> @K
>>>>
>>>> On 16/05/2012 10:34 PM, Henrik wrote: 
>>>>
>>>> Here: https://gist.github.com/2710007
>>>>
>>>> On Tuesday, 15 May 2012 22:27:42 UTC+2, Krzysztof Koźmic wrote: 
>>>>>
>>>>>  I'm not sure I understand.
>>>>>
>>>>> Do you have a failing test to demonstrate it?
>>>>>
>>>>> On 16/05/2012 6:06 AM, Henrik Feldt wrote: 
>>>>>
>>>>>  If it is resolved once, yes, but not otherwise.
>>>>>
>>>>>  
>>>>>
>>>>> The problem is the otherwise. How do I do then?
>>>>>
>>>>>  
>>>>>  
>>>>> *From:* [email protected] [
>>>>> mailto:[email protected]<[email protected]>]
>>>>>  
>>>>> *On Behalf Of *Krzysztof Kozmic
>>>>> *Sent:* den 15 maj 2012 12:02
>>>>> *To:* [email protected]
>>>>> *Subject:* Re: Windsor w/ BackgroundFactoryMethod
>>>>>  
>>>>>  
>>>>>
>>>>> if it's IDisposable it will get disposed
>>>>>
>>>>> On 13/05/2012 10:24 AM, Henrik Feldt wrote: 
>>>>>
>>>>> bump
>>>>>
>>>>>  
>>>>>
>>>>> *From:* [email protected] [
>>>>> mailto:[email protected]<[email protected]>]
>>>>>  
>>>>> *On Behalf Of *Henrik
>>>>> *Sent:* den 9 maj 2012 00:47
>>>>> *To:* [email protected]
>>>>> *Subject:* Windsor w/ BackgroundFactoryMethod
>>>>>
>>>>>  
>>>>>
>>>>> I'm looking to initialize a component on a background thread, so I 
>>>>> hacked something together. It looks like this:
>>>>>
>>>>> https://gist.github.com/2640092
>>>>>
>>>>> It works really nice, except that of course the component isn't being 
>>>>> disposed unless something else that depends on it is resolved, meaning 
>>>>> there's a live component needing disposing which isn't being disposed.
>>>>>
>>>>> Where would I jack into Windsor 3 to provide a piece of logic stating, 
>>>>> that for this type of handler/component/burden (?) when the 
>>>>> container/kernel is being disposed, also perform a resolve and then 
>>>>> release 
>>>>> call, for this component?
>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Castle Project Users" group.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msg/castle-project-users/-/GZa5mIdsbKgJ.
>>>>> To post to this group, send email to 
>>>>> [email protected].
>>>>> To unsubscribe from this group, send email to 
>>>>> [email protected].
>>>>> For more options, visit this group at 
>>>>> http://groups.google.com/group/castle-project-users?hl=en.
>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Castle Project Users" group.
>>>>> To post to this group, send email to 
>>>>> [email protected].
>>>>> To unsubscribe from this group, send email to 
>>>>> [email protected].
>>>>> For more options, visit this group at 
>>>>> http://groups.google.com/group/castle-project-users?hl=en.
>>>>>
>>>>>  
>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Castle Project Users" group.
>>>>> To post to this group, send email to 
>>>>> [email protected].
>>>>> To unsubscribe from this group, send email to 
>>>>> [email protected].
>>>>> For more options, visit this group at 
>>>>> http://groups.google.com/group/castle-project-users?hl=en.
>>>>>  -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Castle Project Users" group.
>>>>> To post to this group, send email to 
>>>>> [email protected].
>>>>> To unsubscribe from this group, send email to 
>>>>> [email protected].
>>>>> For more options, visit this group at 
>>>>> http://groups.google.com/group/castle-project-users?hl=en.
>>>>>
>>>>>
>>>>>  -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Castle Project Users" group.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msg/castle-project-users/-/cjyCuX8UGfgJ.
>>>> To post to this group, send email to 
>>>> [email protected].
>>>> To unsubscribe from this group, send email to 
>>>> [email protected].
>>>> For more options, visit this group at 
>>>> http://groups.google.com/group/castle-project-users?hl=en.
>>>>
>>>>
>>>>   -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Castle Project Users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/castle-project-users/-/OWZzvQz4ulcJ.
>> To post to this group, send email to 
>> [email protected].
>> To unsubscribe from this group, send email to 
>> [email protected].
>> For more options, visit this group at 
>> http://groups.google.com/group/castle-project-users?hl=en.
>>
>>
>>  -- 
> You received this message because you are subscribed to the Google Groups 
> "Castle Project Users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/castle-project-users/-/1cGxiGW_4GEJ.
> To post to this group, send email to [email protected]
> .
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/castle-project-users?hl=en.
>
>
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/castle-project-users/-/UHZtRHTWnBwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to