module Adwords_mt:Adwords for multi-threaded programs. Make sure that this module is linked as object file (.cmo or .cmx) into the final executable, because this module would be garbage- collected if it were in an archive file (.cma or .cmxa). If you use ocamlfind, this will be done automatically provided that a -thread or -vmthread switch is on the command line.sig..end
val iter_campaigns_mt : (unit -> Http_client.pipeline) ->
(Http_client.pipeline -> Adwords.services) ->
?nr_workers:int ->
(Adwords.services -> CampaignService_types.campaign -> unit) -> unitval filter_iter_campaigns_mt : (unit -> Http_client.pipeline) ->
(Http_client.pipeline -> Adwords.services) ->
?nr_workers:int ->
(CampaignService_types.campaign -> bool) ->
(Adwords.services -> CampaignService_types.campaign -> unit) -> unitval iter_adgroups_mt : (unit -> Http_client.pipeline) ->
(Http_client.pipeline -> Adwords.services) ->
?nr_workers:int ->
(Adwords.services ->
CampaignService_types.campaign -> AdGroupService_types.adGroup -> unit) ->
unitval filter_iter_adgroups_mt : (unit -> Http_client.pipeline) ->
(Http_client.pipeline -> Adwords.services) ->
?nr_workers:int ->
(CampaignService_types.campaign -> bool) ->
(CampaignService_types.campaign -> AdGroupService_types.adGroup -> bool) ->
(Adwords.services ->
CampaignService_types.campaign -> AdGroupService_types.adGroup -> unit) ->
unitval iter_criteria_mt : (unit -> Http_client.pipeline) ->
(Http_client.pipeline -> Adwords.services) ->
?nr_workers:int ->
(Adwords.services ->
CampaignService_types.campaign ->
AdGroupService_types.adGroup -> CriterionService_types.criterion -> unit) ->
unitval iter_criteria2_mt : (unit -> Http_client.pipeline) ->
(Http_client.pipeline -> Adwords.services) ->
?nr_workers:int ->
(Adwords.services ->
CampaignService_types.campaign ->
AdGroupService_types.adGroup ->
CriterionService_types.criterion list -> unit) ->
unitval filter_iter_criteria_mt : (unit -> Http_client.pipeline) ->
(Http_client.pipeline -> Adwords.services) ->
?nr_workers:int ->
(CampaignService_types.campaign -> bool) ->
(CampaignService_types.campaign -> AdGroupService_types.adGroup -> bool) ->
(CampaignService_types.campaign ->
AdGroupService_types.adGroup -> CriterionService_types.criterion -> bool) ->
(Adwords.services ->
CampaignService_types.campaign ->
AdGroupService_types.adGroup -> CriterionService_types.criterion -> unit) ->
unitval filter_iter_criteria2_mt : (unit -> Http_client.pipeline) ->
(Http_client.pipeline -> Adwords.services) ->
?nr_workers:int ->
(CampaignService_types.campaign -> bool) ->
(CampaignService_types.campaign -> AdGroupService_types.adGroup -> bool) ->
(CampaignService_types.campaign ->
AdGroupService_types.adGroup -> CriterionService_types.criterion -> bool) ->
(Adwords.services ->
CampaignService_types.campaign ->
AdGroupService_types.adGroup ->
CriterionService_types.criterion list -> unit) ->
unititer_* and filter_* functions found
in the Adwords module. These work in the same way as the normal
versions except that the callback function f can be called in
parallel from several threads (and should be programmed accordingly,
including using locks to access any global structures).
The first two parameters are make_connection and make_services
and are used to give each thread its own HTTPS connection.
See Adwords_cli.make_connection and Adwords_cli.make_services
for suitable functions that you can pass here.
Each callback function differs also in several other respects:
(1) Callbacks should use the services.*_svc service parameters
passed back, and NOT the global Adwords_cli.*_svc services.
(2) The framework catches any exceptions thrown by the callbacks
and prints them (otherwise the worker threads used would die).
Extra optional arguments which may be passed:
?nr_workers controls the number of worker threads (default: 4)